forked from old/legacy-imlib2
and one mroe fix for big endian boxes for imlib png loader
SVN revision: 330
This commit is contained in:
parent
89817dbbd5
commit
35467c71f4
10
loader_png.c
10
loader_png.c
|
@ -114,10 +114,18 @@ load (ImlibImage *im,
|
||||||
h = im->h;
|
h = im->h;
|
||||||
if (hasa)
|
if (hasa)
|
||||||
png_set_expand(png_ptr);
|
png_set_expand(png_ptr);
|
||||||
|
/* we want ARGB */
|
||||||
|
png_set_bgr(png_ptr);
|
||||||
|
#ifdef __BIG_ENDIAN__
|
||||||
|
png_set_swap_alpha(png_ptr);
|
||||||
|
#endif
|
||||||
|
/* 16bit color -> 8bit color */
|
||||||
|
png_set_strip_16(png_ptr);
|
||||||
/* we want ARGB */
|
/* we want ARGB */
|
||||||
png_set_bgr(png_ptr);
|
|
||||||
#ifdef __BIG_ENDIAN__
|
#ifdef __BIG_ENDIAN__
|
||||||
png_set_swap_alpha(png_ptr);
|
png_set_swap_alpha(png_ptr);
|
||||||
|
#else
|
||||||
|
png_set_bgr(png_ptr);
|
||||||
#endif
|
#endif
|
||||||
/* 16bit color -> 8bit color */
|
/* 16bit color -> 8bit color */
|
||||||
png_set_strip_16(png_ptr);
|
png_set_strip_16(png_ptr);
|
||||||
|
|
Loading…
Reference in New Issue