Re: Small bug in subgen-image.c
Niels Horn <[email protected]>
| Newsgroups | gmane.comp.multimedia.dvdauthor.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jun 22, 2010 at 8:21 AM, Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]> wrote: > On 21/06/10 23:47, Niels Horn wrote: > >> I've been using dvdauthor in combination with tovid and discovered >> that it sometimes gives an error about png images being too big, while >> they aren't. > > On a 64-bit architecture, presumably? Big-endian, by any chance? (Just > wondering why I never noticed this on my AMD64 machine.) > This is on a Slackware64 Linux machine and it happens with tovid (I use mostly) and devede (I use once in a while), when it creates the menus by overlaying several images with "Highlights" (a border around an image, underlining some text, etc.) to show the selected item. I talked to people using dvdauthor with other programs / directly from the command-line that had no problems at all. >> The following patch (against the stable 0.6.18 version) solves it: > > Thanks for that. > >> @@ -271,7 +271,7 @@ >> assert(bit_depth==8); // 8bpp, not 1, 2, 4, or 16 >> assert(!(color_type&PNG_COLOR_MASK_PALETTE)); // not a palette >> if( width>MAXX || height>MAXY ) { >> - fprintf(stderr,"ERR: PNG %s is too big: >> %lux%lu\n",s->fname,width,height); >> + fprintf(stderr,"ERR: PNG %s is too big: >> %lux%lu\n",s->fname,(long unsigned int)width,(long unsigned >> int)height); >> png_destroy_read_struct(&ps,&pi,NULL); >> return -1; >> } > > I would dispense with the casts, and take out the “l” modifiers on the > format specifiers. > Looking at it now you're right of course. I did this as a quick patch to test the result and never went back to clean it up. :) > Normally I prefer to discuss patches on dvdauthor-developer: that’s the > list for the technicalities of the source code, this list is for the > technicalities of using the code. > OK, sorry for that... I'm new in this list and will subscribe to the developer list as well. > Though I admit things might get blurred sometime... > Hope this will make it into the next release! Niels ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo