Hi, > > I have changed the core so that it does not accept zero resolutions. > > > > Additionally I have changed all plug-ins that try to set the resolution > > to check the value and simply don't set it at all if it is invalid. Gimp > > will then use the default set up by the user. > > Perl, IIRC teaches us that "There's always more than one way to do it", > while it seems that Gimp teaches us that "There's always more than one > place to change it." > > If we do not accept arbitrary values for xresolution & yresolution we > need to check for this in image_set_resolution_invoker as well. This > is the approach I've taken in current CVS. > > Alternatively we could change image_set_resolution_invoker() and > similar functions to be thin wrappers around core functionality -- > I do not have time to do that, but perhaps someone else does? > Oops, I thought (but should have checked) that image_set_resolution_invoker was calling the gimp_image_set_resolution() in app/gimpimage.c. And probably it should since the core function keeps the undo_stack in sync by calling undo_push_resolution (gimage). On the other hand if called from the PDB, we probably don't want to gdisplays_shrink_wrap (gimage)... Salut, Sven