g_warnings in png loader



I stumbled over some g_warnings in io-png.c which can be triggered by
bad/unexpected data. Examples are:

in png_text_to_pixbuf_option:
 g_warning ("Couldn't convert PNG text chunk value to UTF-8.");

(I think it would be better to silently skip the bad text chunk here)


in gdk_pixbuf__png_image_load:
 g_warning ("Got multiple tEXt chunks for the same key.");

(This is not forbidden by the PNG spec - with 1.2 you can have localized
itxt chunks, so there could be a "Description" for "de" and another one
for "en". I think we should silently pick one of the chunks, either
simply the first one, or try to be fancy and match the locale. I guess
adding API for localized pixbuf options would be over the top)  


in gdk_pixbuf__png_image_save:
 g_warning ("Bad option name '%s' passed to PNG saver", *kiter);

(This is a programming error which should be signalled by setting the
 GError).


Do you agree ?

Matthias






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]