projects
/
geeqie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c6793b7
)
better fix for big-endian architectures
author
Vladimir Nadvornik
<nadvornik@suse.cz>
Sun, 23 Sep 2012 09:19:36 +0000
(11:19 +0200)
committer
Vladimir Nadvornik
<nadvornik@suse.cz>
Sun, 23 Sep 2012 09:19:36 +0000
(11:19 +0200)
src/image_load_tiff.c
patch
|
blob
|
history
diff --git
a/src/image_load_tiff.c
b/src/image_load_tiff.c
index
3774f9d
..
07e6786
100644
(file)
--- a/
src/image_load_tiff.c
+++ b/
src/image_load_tiff.c
@@
-295,18
+295,21
@@
static gboolean image_loader_tiff_load (gpointer loader, const guchar *buf, gsiz
/* Turns out that the packing used by TIFFRGBAImage depends on
* the host byte order...
*/
/* Turns out that the packing used by TIFFRGBAImage depends on
* the host byte order...
*/
- while (pixels < lt->pixbuf->pixels + bytes)
+ {
+ guchar *ptr = pixels;
+ while (ptr < pixels + bytes)
{
{
- uint32 pixel = *(uint32 *)p
ixels
;
+ uint32 pixel = *(uint32 *)p
tr
;
int r = TIFFGetR(pixel);
int g = TIFFGetG(pixel);
int b = TIFFGetB(pixel);
int a = TIFFGetA(pixel);
int r = TIFFGetR(pixel);
int g = TIFFGetG(pixel);
int b = TIFFGetB(pixel);
int a = TIFFGetA(pixel);
- *p
ixels
++ = r;
- *p
ixels
++ = g;
- *p
ixels
++ = b;
- *p
ixels
++ = a;
+ *p
tr
++ = r;
+ *p
tr
++ = g;
+ *p
tr
++ = b;
+ *p
tr
++ = a;
}
}
+ }
#endif
lt->area_updated_cb(loader, 0, 0, width, height, lt->data);
#endif
lt->area_updated_cb(loader, 0, 0, width, height, lt->data);