]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/gil/example/resize.cpp
50dd03e92434aa1ed2ee3af49206985e3fbc880b
2 Copyright 2005-2007 Adobe Systems Incorporated
4 Use, modification and distribution are subject to the Boost Software License,
5 Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt).
8 See http://opensource.adobe.com/gil for most recent version including documentation.
11 /*************************************************************************************************/
14 /// \brief Test file for resize_view() in the numeric extension
15 /// \author Lubomir Bourdev and Hailin Jin
16 /// \date February 27, 2007
18 ///////////////////////
19 //// NOTE: This sample file uses the numeric extension, which does not come with the Boost distribution.
20 //// You may download it from http://opensource.adobe.com/gil
21 ///////////////////////
23 #include <boost/gil/image.hpp>
24 #include <boost/gil/typedefs.hpp>
25 #include <boost/gil/extension/io/jpeg_io.hpp>
26 #include <boost/gil/extension/numeric/sampler.hpp>
27 #include <boost/gil/extension/numeric/resample.hpp>
30 using namespace boost::gil
;
33 jpeg_read_image("test.jpg",img
);
36 // Scale the image to 100x100 pixels using bilinear resampling
37 rgb8_image_t
square100x100(100,100);
38 resize_view(const_view(img
), view(square100x100
), bilinear_sampler());
39 jpeg_write_view("out-resize.jpg",const_view(square100x100
));