Steps to reproduce:
1.) Create a new picture in gimp.
2.) Select in gimp a small region of approximately 15x25 pixels.
3.) Call gmic and select filter “Deformations->Cartesian transform”.
4.) Call “zoom in” function in preview three times. Gmic will display “preview may be inaccurate” warning.
5.) Now just call “zoom in” function at least five times and gmic will crash with following message:
GIMP Message
Calling error for procedure ‘gimp-drawable-sub-thumbnail’: Procedure ‘gimp-drwable-sub-tumbnail’
has been called with value ‘0’ for argument ‘src-width’ (#3, type GimpInt32). This value is
out of range.
Well, I’ve been over-confident Looks like this is a bug in the default GimpPreviewWidget, so I can’t do much except prevent the plug-in to crash when the user zooms a lot on a selection.
But you’ll still get the dialog window.
Crash is gone. After 8 times of zooming in gimp is printing out a “out of range” message. If I zoom in addtionally, gimp will be printing another out of range message. But if I zoom out now gimp will be printing another out of range message, which is strange.
However, I think it will be more usable if there is a zooming restriction like in the zoom out function. If I zoom out very often, zoom out button will be disabled and no further zoom out is possible.
So is it possible to restrict zoom in value in the same manner?
No, actually this is managed by the GimpZoomPreview widget, and limiting the zoom factor would mean modifying the source code for this component, which is a part of the GIMP source code, not G’MIC.