[mythtv] Couldn't save cache image: blank.png

Michael McLagan mmclagan at invlogic.com
Mon Nov 24 13:57:44 EST 2003


On Mon, 24 Nov 2003 13:09:31 -0500, Joseph A. Caputo wrote:

>Well, it looks like when the blank.png image gets scaled, a null image 
>results (not to be confused with a NULL pointer... a null image is a 
>valid QImage object, but with all zero data & values).  I guess Qt 
>doesn't like trying to save a null image.  Now, why it's a null image 
>in the first place, I'm not sure.  I guess it has something to do with 
>the fact that the image only has a background layer, which seems to be 
>either empty or a single color.  I don't know much about image layers & 
>data, etc.  Somebody else can take it from here if they want.  We could 
>have LoadScaleImage return NULL if a null image is the result of 
>scaling, but you'd then get an error message about not being able to 
>generate the scaled image (which actually might be more accurate, 
>though...).  Note that the image is not null before scaling, it's only 
>the result of calling QImage::smoothScale (I also tried QImage::scale) 
>that's a null image.

If a null image results, how about creating a new image of the desired 
size with only the background and saving that in place of the attempt to 
scale it?  That would at least create a blank.png and keep from having to 
rescale the image each time.

   Michael




More information about the mythtv-dev mailing list