]> git.pld-linux.org Git - packages/captury.git/blob - captury-libpng.patch
- use http://ftp.debian.org/ url
[packages/captury.git] / captury-libpng.patch
1 --- captury-0.3.0~svn158.orig/src/libGLcaptury/TScreenshot.cpp.orig     2007-06-13 11:42:56.000000000 +0200
2 +++ captury-0.3.0~svn158.orig/src/libGLcaptury/TScreenshot.cpp  2014-01-18 21:16:13.203428852 +0100
3 @@ -63,7 +63,7 @@
4  }
5  
6  void TScreenshot::onWritePNG(png_structp APng, png_bytep ABuffer, png_size_t ASize) {
7 -       int fd = *static_cast<int *>(APng->io_ptr);
8 +       int fd = *static_cast<int *>(png_get_io_ptr(APng));
9         write(fd, ABuffer, ASize);
10  }
11  
12 @@ -103,15 +103,12 @@
13         png_set_write_fn(png, &fd, &TScreenshot::onWritePNG, &TScreenshot::onFlushPNG);
14         png_set_compression_level(png, 4);
15  
16 -       info->width = width;
17 -       info->height = height;
18 -       info->bit_depth = 8;
19 -       info->color_type = PNG_COLOR_TYPE_RGB;
20 +       png_set_IHDR(png, info, width, height, 8, PNG_COLOR_TYPE_RGB, 0, 0, 0);
21  
22         png_write_info(png, info);
23  
24         const int lineStride = width * 3;
25 -       for (int y = info->height - 1; y >= 0; --y)
26 +       for (int y = height - 1; y >= 0; --y)
27                 png_write_row(png, (png_bytep)buffer + y * lineStride);
28  
29         png_write_end(png, info);
This page took 0.074107 seconds and 3 git commands to generate.