GNOME Bugzilla – Bug 589629
Image transformation: resize image
Last modified: 2021-06-19 08:46:49 UTC
This transformation appears as task in roadmap for 2.20 but not have entry in bugzilla. I start to study how to implement this feature and have some questions: 1. Scale/Resize transformation its very easy to implement with cairo!! but in case of jpeg images, when we save the image the transformations are performed by libeog-jpegutils library. This library its very old. Why we use this library? What is the difference with cairo? It would be better to remove the dependence with this library and use cairo for image transformations? 2. What is the best way to implement a dialog for scaling image? EogDialog class like preferences dialog? 3. The image resulting of scaling transformation, would be larger than original? In this case this image will have lower resolution and pixelated. Thanks for your response.
(In reply to comment #0) > 1. Scale/Resize transformation its very easy to implement with cairo!! but in > case of jpeg images, when we save the image the transformations are performed > by libeog-jpegutils library. > > This library its very old. Why we use this library? What is the difference with > cairo? It would be better to remove the dependence with this library and use > cairo for image transformations? > libeog-jpegutils is our interface to libjpeg which allows rotations and flips to be "lossless" operations on JPEGs. This is AFAIK not supported by cairo. > 2. What is the best way to implement a dialog for scaling image? EogDialog > class like preferences dialog? > I'd say that's your decision. EogDialog is I think more or less a helper to aid with using GtkBuilder-based dialogs. > 3. The image resulting of scaling transformation, would be larger than > original? In this case this image will have lower resolution and pixelated. If I understand you correctly here, you're worried about the pixelated output when scaling the images. Well, I guess in that case you should probably provide access to cairo's filtering settings (cairo_filter_t).
Created attachment 139949 [details] Image Scale dialog layout I'm working in this new transformation. For this, i'm implementing a new dialog for selecting the new size desired. You can see the current layout of this dialog in the attached image. In this dialog, the user can select the new width and height size of the current image expressed in the unit selected. For now, only in pixels and percents. And one more thing, the values of width and height sizes are always proportional. What do you think about this dialog? Do I need to change anything?
After some time searching for the better way to implement the image scale transformation, i discovered the gegl(1) library. This library allow us to perform many operation and filters over the images. The worst is that this library is very young (0.1.3) and its API isn't frozen yet. Could we use this library to perform eog image transformations? (scale, rotate, flip, .... and more) What do you think? (1) http://www.gegl.org/
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/eog/-/issues/ Thank you for your understanding and your help.