Fixed the red/green/red bug on two occasions. Changed from the custom
1999-12-08 Arjan van de Ven <arjan@fenrus.demon.nl> * gdk-pixbuf/gdk-pixbuf-drawable.c : Fixed the red/green/red bug on two occasions. * gdk-pixbuf/io-ras.c: Changed from the custom be32_to_cpu function to the generic glib one.
This commit is contained in:
parent
c6f25c2de8
commit
880f5ade6b
@ -1,3 +1,10 @@
|
|||||||
|
1999-12-08 Arjan van de Ven <arjan@fenrus.demon.nl>
|
||||||
|
|
||||||
|
* gdk-pixbuf/gdk-pixbuf-drawable.c : Fixed the red/green/red
|
||||||
|
bug on two occasions.
|
||||||
|
* gdk-pixbuf/io-ras.c: Changed from the custom be32_to_cpu
|
||||||
|
function to the generic glib one.
|
||||||
|
|
||||||
1999-12-08 Federico Mena Quintero <federico@redhat.com>
|
1999-12-08 Federico Mena Quintero <federico@redhat.com>
|
||||||
|
|
||||||
* gdk-pixbuf/gdk-pixbuf-drawable.c: Fix includes.
|
* gdk-pixbuf/gdk-pixbuf-drawable.c: Fix includes.
|
||||||
|
@ -63,16 +63,6 @@ struct rasterfile {
|
|||||||
be32_to_cpu() ??
|
be32_to_cpu() ??
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static unsigned int be32_to_cpu(guint i)
|
|
||||||
{
|
|
||||||
unsigned int i2;
|
|
||||||
i2 =
|
|
||||||
((i & 255) << 24) | (((i >> 8) & 255) << 16) |
|
|
||||||
(((i >> 16) & 255) << 8) | ((i >> 24) & 255);
|
|
||||||
return i2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Progressive loading */
|
/* Progressive loading */
|
||||||
|
|
||||||
struct ras_progressive_state {
|
struct ras_progressive_state {
|
||||||
@ -142,12 +132,12 @@ GdkPixbuf *image_load(FILE * f)
|
|||||||
static void RAS2State(struct rasterfile *RAS,
|
static void RAS2State(struct rasterfile *RAS,
|
||||||
struct ras_progressive_state *State)
|
struct ras_progressive_state *State)
|
||||||
{
|
{
|
||||||
State->Header.width = be32_to_cpu(RAS->width);
|
State->Header.width = GUINT32_FROM_BE(RAS->width);
|
||||||
State->Header.height = be32_to_cpu(RAS->height);
|
State->Header.height = GUINT32_FROM_BE(RAS->height);
|
||||||
State->Header.depth = be32_to_cpu(RAS->depth);
|
State->Header.depth = GUINT32_FROM_BE(RAS->depth);
|
||||||
State->Header.type = be32_to_cpu(RAS->type);
|
State->Header.type = GUINT32_FROM_BE(RAS->type);
|
||||||
State->Header.maptype = be32_to_cpu(RAS->maptype);
|
State->Header.maptype = GUINT32_FROM_BE(RAS->maptype);
|
||||||
State->Header.maplength = be32_to_cpu(RAS->maplength);
|
State->Header.maplength = GUINT32_FROM_BE(RAS->maplength);
|
||||||
|
|
||||||
g_assert(State->Header.maplength <= 768); /* Otherwise, we are in trouble */
|
g_assert(State->Header.maplength <= 768); /* Otherwise, we are in trouble */
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ rgb1a (GdkImage *image, art_u8 *pixels, int rowstride)
|
|||||||
remap[xx] = 0xff
|
remap[xx] = 0xff
|
||||||
| colormap->colors[xx].red << 24
|
| colormap->colors[xx].red << 24
|
||||||
| colormap->colors[xx].green << 16
|
| colormap->colors[xx].green << 16
|
||||||
| colormap->colors[xx].red << 8;
|
| colormap->colors[xx].blue << 8;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ rgb8a (GdkImage *image, art_u8 *pixels, int rowstride)
|
|||||||
remap[xx] = 0xff
|
remap[xx] = 0xff
|
||||||
| colormap->colors[xx].red << 24
|
| colormap->colors[xx].red << 24
|
||||||
| colormap->colors[xx].green << 16
|
| colormap->colors[xx].green << 16
|
||||||
| colormap->colors[xx].red << 8;
|
| colormap->colors[xx].blue << 8;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user