From: Carsten H. (T. R. <ra...@ra...> - 2001-10-10 01:14:01
|
On Tue, 09 Oct 2001 15:27:36 -0700 enl...@li... babbled profusely: > Enlightenment CVS committal > > Author : rbdpngn > Project : e17 > Module : libs/imlib2_loaders > > Dir : e17/libs/imlib2_loaders/src > > > Modified Files: > loader_db.c > > > Log Message: > After much hair pulling, fixed a bug in the db loader that affected big endian > systems. > > When saving compressed images, the header was not being byte swapped, but it > was when loading (which is why db's created on little endian systems worked, > but > not ones created and used on the big endian systems). So now the headers are > also swapped to little endian order when saving. OOOOOOOOOOOH1 thanks! i would have never noticed! :) > > =================================================================== > RCS file: /cvsroot/enlightenment/e17/libs/imlib2_loaders/src/loader_db.c,v > retrieving revision 1.1 > retrieving revision 1.2 > diff -u -3 -r1.1 -r1.2 > --- loader_db.c 2001/08/12 14:52:17 1.1 > +++ loader_db.c 2001/10/09 22:27:36 1.2 > @@ -325,7 +325,11 @@ > buflen = ((im->w * im->h * sizeof(DATA32) * 101) / 100) + 12; > #ifdef WORDS_BIGENDIAN > { > + int i; > DATA32 *buf2; > + > + for (i = 0; i < 8; i++) > + SWAP32(header[i]); > > buf2 = malloc((((im->w * im->h * 101) / 100) + 3) * sizeof(DATA32)); > if (buf2) > > > > _______________________________________________ > enlightenment-cvs mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) ra...@ra... Unemployed Bum ra...@de... Mobile Phone: +61 (0)408 363 984 Home Phone: 02 9386 9362 |
From: Christian K. <kre...@in...> - 2001-10-10 19:35:18
|
"Carsten Haitzler (The Rasterman)" wrote: > > On Tue, 09 Oct 2001 15:27:36 -0700 enl...@li... > babbled profusely: > > > Enlightenment CVS committal > > > > Author : rbdpngn > > Project : e17 > > Module : libs/imlib2_loaders > > > > Dir : e17/libs/imlib2_loaders/src > > > > > > Modified Files: > > loader_db.c > > > > > > Log Message: > > After much hair pulling, fixed a bug in the db loader that affected big endian > > systems. > > > > When saving compressed images, the header was not being byte swapped, but it > > was when loading (which is why db's created on little endian systems worked, > > but > > not ones created and used on the big endian systems). So now the headers are > > also swapped to little endian order when saving. > > OOOOOOOOOOOH1 thanks! i would have never noticed! :) If you don't mind a dumb question from someone who's never looked at the db loader -- why is there any byteswapping involved at all? I thought one of edb's purposes was to hide that by saving in network byte order and loading to the host order? -- Christian. ________________________________________________________________________ http://www.whoop.org |
From: Carsten H. (T. R. <ra...@ra...> - 2001-10-10 21:37:31
|
On Wed, 10 Oct 2001 21:13:21 +0200 Christian Kreibich <kre...@in...> babbled profusely: > "Carsten Haitzler (The Rasterman)" wrote: > > > > On Tue, 09 Oct 2001 15:27:36 -0700 enl...@li... > > babbled profusely: > > > > > Enlightenment CVS committal > > > > > > Author : rbdpngn > > > Project : e17 > > > Module : libs/imlib2_loaders > > > > > > Dir : e17/libs/imlib2_loaders/src > > > > > > > > > Modified Files: > > > loader_db.c > > > > > > > > > Log Message: > > > After much hair pulling, fixed a bug in the db loader that affected big > endian > > > systems. > > > > > > When saving compressed images, the header was not being byte swapped, but > it > > > was when loading (which is why db's created on little endian systems > worked, > > > but > > > not ones created and used on the big endian systems). So now the headers > are > > > also swapped to little endian order when saving. > > > > OOOOOOOOOOOH1 thanks! i would have never noticed! :) > > If you don't mind a dumb question from someone who's never looked at the > db loader -- why is there any byteswapping involved at all? I thought > one of edb's purposes was to hide that by saving in network byte order > and loading to the host order? it hides it if you are loading single primtives (int, float, str) but if u just get raw data - there is no waying what its encoded in.. some parts may be ints.. some chars.. some floats... the app then neds to deal with this... the db loader does this. (the header is a 32bit magic numebr then int's for width, height and alpha mask). > -- Christian. > ________________________________________________________________________ > http://www.whoop.org > > > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) ra...@ra... Unemployed Bum ra...@de... Mobile Phone: +61 (0)408 363 984 Home Phone: 02 9386 9362 |
From: Christian K. <kre...@in...> - 2002-04-24 20:57:18
|
enl...@li... wrote: > > Enlightenment CVS committal > > Author : rbdpngn > Project : e17 > Module : libs/imlib2_loaders > > Dir : e17/libs/imlib2_loaders/src > > Modified Files: > loader_ani.c > > Log Message: > Fix an unresolved symbol (cK is this fix what you intended?). Doh. Sure. Thanks. > Feh segv's trying > to load a .ani file on big endian systems, I'll see if I can track it down. So .ico's work? Then the fix should be relatively simple, because that loader is much simpler. Try *not* using SWAP32 for example, I'm not sure if it's even needed. Christian. -- ________________________________________________________________________ http://www.whoop.org |
From: Nathan I. <ningerso@d.umn.edu> - 2002-04-24 21:28:55
|
On Wed, Apr 24, 2002 at 10:58:16PM +0200, Christian Kreibich is quoted as saying: > > Feh segv's trying > > to load a .ani file on big endian systems, I'll see if I can track it down. > > So .ico's work? Then the fix should be relatively simple, because that > loader is much simpler. Try *not* using SWAP32 for example, I'm not sure > if it's even needed. > > Christian. > -- > ________________________________________________________________________ > http://www.whoop.org Nope no go on the .ico's either. feh WARNING: test_monochrome_32x32.ico - No Imlib2 loader for that file format I added a check to make sure the calloc succeeds in the ani loader, and it doesn't. D("Warning, failed to allocate ANI chunk of size %d\n", sizeof(MsChunk*) + 2 * sizeof(DATA32) + chunk_size); results in: Imlib2 ANI loader: Warning, failed to allocate ANI chunk of size 603979788 So it looks like the problem lies in ani_read_int32. RbdPngn --------------------------------------------------------------------------- | Nathan Ingersoll | Computer Science/Mathematics | | mailto: ningerso@d.umn.edu | University of Minnesota-Duluth | | http://umn.edu/~ningerso | http://www.d.umn.edu | --------------------------------------------------------------------------- |
From: Christian K. <kre...@in...> - 2002-04-24 21:42:07
|
Nathan Ingersoll wrote: > > Nope no go on the .ico's either. Okay then it'll be harder -- definitely look at ico_get_bit_from_data() and ico_get_nibble_from_data(), these probably rely on endianness. Watch out with the and_maps, these are bitmaps that define whether a pixel is transparent or not and get padded out to 32bit. Have a look at http://www.daubnet.com/formats/ICO.html http://www.oreilly.com/centers/gff/formats.htm if it's totally unclear what I'm doing, that's where I got the specs from. You don't have to fight this for too long, I can spend a couple hours on this at the Suns at the Uni as well. Christian. ps: I think MS's file formats aren't quite as dumb as people usually claim, at least it's not that easy to write loaders for them :) -- ________________________________________________________________________ http://www.whoop.org |
From: Christian K. <kre...@in...> - 2002-04-25 09:45:53
|
enl...@li... wrote: > > Enlightenment CVS committal > > Author : rbdpngn > Project : e17 > Module : libs/imlib2_loaders > > Dir : e17/libs/imlib2_loaders/src > > Modified Files: > loader_ani.c loader_ico.c > > Log Message: > The loaders now work on big endian systems. Someone please test this on x86 > and let me know that I didn't break anything. Still work like a charm. Thanks! Cheers, Christian. -- ________________________________________________________________________ http://www.whoop.org |
From: Nathan I. <ningerso@d.umn.edu> - 2002-04-25 16:47:17
|
On Thu, Apr 25, 2002 at 11:46:47AM +0200, Christian Kreibich is quoted as saying: > > Still work like a charm. Thanks! > > Cheers, > Christian. > -- > ________________________________________________________________________ > http://www.whoop.org No problem. :-) RbdPngn --------------------------------------------------------------------------- | Nathan Ingersoll | Computer Science/Mathematics | | mailto: ningerso@d.umn.edu | University of Minnesota-Duluth | | http://umn.edu/~ningerso | http://www.d.umn.edu | --------------------------------------------------------------------------- |