flozz / yoga-image-optimizer

A graphical tool to convert and optimize JPEG, PNG and WebP images (based on YOGA)
https://yoga.flozz.org
GNU General Public License v3.0
137 stars 11 forks source link

Write to and open temporary folder instead #6

Open sonnyp opened 3 years ago

sonnyp commented 3 years ago

Great work and thanks for sharing!

Instead of the "Output file" field, I would like to suggest creating a temporary folder instead and upon completion open it with the default file manager. The folder would contain the list of output files.

As a user, I can then simply move/copy/drag'n drop the files to the desired location(s).

Here are a few pros to this approach if you're not conviced

  1. The input files are usually not where you want the output files to be (~/Downloads)
  2. Output files are usually meant to be in the same folder .../assets
  3. Works best for bulk with source files from different location
  4. Immediately let the user organize the output files
  5. Remove the need for flatpak --filesystem=host permission https://github.com/flathub/flathub/pull/2376/#discussion_r649999765

I guess the only con is that user action is required after completion but I can't imagine use cases for optimizing files and not moving them around afterwards anyway.

flozz commented 3 years ago

Hello,

The current behavior was implemented because it was simple (and "ok" for the v1.0). I planned to let the user configure output pattern and locations in a future version. :)

Having a temporary folder could be one of the available options (why not the default one) but I think it cannot be the only option as it can also add some issues. For example, what to do if we have images with the same names in different folders, or if we have many images and we need to keep the folder architecture (it is one of my use case while optimizing assets for 3D web app or video game).

Anyway, I am still thinking of what will be the best solution for output files, but it will probably take a month or two before I am able to back on this project and implement it (I am currently very late on an other project I have to work on) :)