Changeset 99117
- Timestamp:
- Oct 27, 2012, 6:23:04 AM (12 years ago)
- Location:
- trunk/dports/graphics/exact-image
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dports/graphics/exact-image/Portfile
r97300 r99117 4 4 5 5 name exact-image 6 version 0.8.4 7 revision 1 6 version 0.8.7 8 7 categories graphics 9 8 license GPL-2 … … 19 18 20 19 use_bzip2 yes 21 checksums md5 a7f18ca4d2970d9e2d74bdea84990c78 \ 22 sha1 36d946be607699e166e81fc451ee878f646a94c5\23 rmd160 0e60d5fc30c6d88ea4ae8e1a5c34e119c281204a20 21 checksums rmd160 8e3f11a94688cc276ca4c29021e4b9231da25629 \ 22 sha256 b1b5d00e98903b7f87019920b200c600c8cbfe574ec158729566fa37f2641dfd 24 23 25 24 depends_build port:pkgconfig … … 27 26 port:libpng \ 28 27 port:jasper \ 28 port:evas \ 29 29 port:expat \ 30 port:openexr \ 30 31 port:lcms 31 32 … … 34 35 configure.compiler gcc-4.2 35 36 } 37 38 # error: variable length array of non-POD element type 39 compiler.blacklist clang 36 40 37 41 patchfiles codecs_png.cc.diff … … 42 46 --with-libpng \ 43 47 --with-jasper \ 48 --with-evas \ 44 49 --with-expat \ 50 --with-openexr \ 45 51 --with-lcms \ 52 --without-bardecode \ 46 53 --without-libungif \ 47 54 --without-lua \ -
trunk/dports/graphics/exact-image/files/codecs_png.cc.diff
r75828 r99117 1 --- codecs/png.cc.orig 2011-02-09 16:18:47.000000000 +1100 2 +++ codecs/png.cc 2011-02-09 16:25:04.000000000 +1100 3 @@ -71,7 +71,7 @@ int PNGCodec::readImage (std::istream* s 1 --- codecs/png.cc.orig 2010-03-03 15:04:44.000000000 -0600 2 +++ codecs/png.cc 2012-10-26 14:48:30.000000000 -0500 3 @@ -17,6 +17,7 @@ 4 5 #include <stdlib.h> 6 #include <png.h> 7 +#include <zlib.h> 8 9 #include <iostream> 10 11 @@ -71,7 +72,7 @@ 4 12 /* Allocate/initialize the memory for image information. REQUIRED. */ 5 13 info_ptr = png_create_info_struct(png_ptr); … … 10 18 } 11 19 12 @@ -82,7 +8 2,7 @@ int PNGCodec::readImage (std::istream* s20 @@ -82,7 +83,7 @@ 13 21 14 22 if (setjmp(png_jmpbuf(png_ptr))) { … … 19 27 return 0; 20 28 } 21 @@ -99, 7 +99,7 @@ int PNGCodec::readImage (std::istream* s29 @@ -99,12 +100,12 @@ 22 30 png_read_info (png_ptr, info_ptr); 23 31 … … 28 36 image.w = width; 29 37 image.h = height; 30 @@ -196,11 +196,11 @@ int PNGCodec::readImage (std::istream* s 38 image.bps = bit_depth; 39 - image.spp = info_ptr->channels; 40 + image.spp = png_get_channels(png_ptr, info_ptr); 41 42 png_uint_32 res_x, res_y; 43 res_x = png_get_x_pixels_per_meter(png_ptr, info_ptr); 44 @@ -123,7 +124,13 @@ 45 if (color_type == PNG_COLOR_TYPE_PALETTE) { 46 png_set_palette_to_rgb(png_ptr); 47 image.bps = 8; 48 - if (info_ptr->num_trans) 49 + 50 + png_bytep trans_alpha; 51 + int num_trans; 52 + png_color_16p trans_color; 53 + png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); 54 + 55 + if (num_trans) 56 image.spp = 4; 57 else 58 image.spp = 3; 59 @@ -196,11 +203,11 @@ 31 60 for (int pass = 0; pass < number_passes; ++pass) 32 61 for (unsigned int y = 0; y < height; ++y) { … … 42 71 /* that's it */ 43 72 return true; 44 @@ -224,7 +2 24,7 @@ bool PNGCodec::writeImage (std::ostream*73 @@ -224,7 +231,7 @@ 45 74 /* Allocate/initialize the memory for image information. REQUIRED. */ 46 75 info_ptr = png_create_info_struct(png_ptr); … … 51 80 } 52 81 53 @@ -244,8 +2 44,6 @@ bool PNGCodec::writeImage (std::ostream*82 @@ -244,8 +251,6 @@ 54 83 else if (quality > Z_BEST_COMPRESSION) quality = Z_BEST_COMPRESSION; 55 84 png_set_compression_level(png_ptr, quality);
Note: See TracChangeset
for help on using the changeset viewer.