GNOME Bugzilla – Bug 768043
Some GdkPixbuf option helpers
Last modified: 2016-08-02 18:51:43 UTC
.
Created attachment 330372 [details] [review] gdk-pixbuf: Add gdk_pixbuf_copy_options() helper
Created attachment 330373 [details] [review] gdk-pixbuf: Add gdk_pixbuf_remove_option() helper
Created attachment 330374 [details] [review] tests: Add tests for new options helpers Exercising copy_options() and remove_option().
Created attachment 330375 [details] [review] gdk-pixbuf: Mention copy_options() in copy()
Created attachment 330392 [details] [review] gdk-pixbuf: Make set_option() usable in client code Not just in loaders.
Review of attachment 330372 [details] [review]: This is just 'g_strdupv with a funny hat' ? I guess it doesn't hurt much...
Review of attachment 330373 [details] [review]: ugh. this is uglier than one would hope for. Maybe we should redo the options storage in a more structured way. Anyway, I don't mind adding this api. Can you add this to the docs too, please ?
Review of attachment 330374 [details] [review]: Sure ::: tests/pixbuf-save.c @@ +153,3 @@ +#endif + gdk_pixbuf_remove_option (pixbuf2, "tEXt::long-option-name123456789123456789123456789"); + g_assert_false (gdk_pixbuf_remove_option (pixbuf2, "tEXt::option1")); Should probably verify that the options on pixbuf2 are what we expect them to be, after this ?
Review of attachment 330375 [details] [review]: sure
Review of attachment 330392 [details] [review]: ok. Is this already in the docs ?
Attachment 330372 [details] pushed as f2206a3 - gdk-pixbuf: Add gdk_pixbuf_copy_options() helper Attachment 330373 [details] pushed as 4d05ef0 - gdk-pixbuf: Add gdk_pixbuf_remove_option() helper Attachment 330374 [details] pushed as be62101 - tests: Add tests for new options helpers Attachment 330375 [details] pushed as ce4b2a8 - gdk-pixbuf: Mention copy_options() in copy() Attachment 330392 [details] pushed as 6b75ef9 - gdk-pixbuf: Make set_option() usable in client code