From: Alexander S. <ale...@gm...> - 2008-10-03 20:38:51
|
On Sun, Sep 14, 2008 at 5:58 PM, Adrian McMenamin <ad...@ne...> wrote: > I would like an interlaced but not filtered 8- or 16-bit truecolour PNG > - there doesn't seem to be such a thing in the test suite. > > Anyone have one they can email me or point me to? No one replied so far, so let me jump in. :-) Attached is an 8-bit truecolor interlaced PNG with _default_ filtering (don't know what did you mean by "not filtered"). The file was created with the aid of png++, the C++ wrapper for libpng using the following simple program: $ cat create-interlaced-png.cpp #include <png.hpp> int main() { png::image< png::rgb_pixel > image(64, 64); for (size_t y = 0; y < image.get_height(); ++y) { for (size_t x = 0; x < image.get_width(); ++x) { image[y][x] = png::rgb_pixel(x*4, 255 - y*4, x*y / 16); // let's have some nice color pattern ;) } } image.set_interlace_type(png::interlace_adam7); image.write("interlaced-truecolor.png"); } $ g++ create-interlaced-png.cpp -I /home/shulz/src/png++/ -lpng $ ./a.out $ file interlaced-truecolor.png interlaced-truecolor.png: PNG image, 64 x 64, 8-bit/color RGB, interlaced $ Hope this is what you needed. :-) -- Cheers, Alex |