Tools for optimizing images for web in Haiku


#1

I would like to know what tools are currently available to optimize images for web in Haiku, especially to reduce their file size. I have already found a couple command-line utilities in HaikuDepot, which I still haven’t had the time to try, but would like to know which ones you use, if you are using any at all, of course.

On macOS, I have settled with JPEGmini and ImageOptim (which in turn allows combine the use of several standalone utilities like pngcrush). On iOS, from which I currently build and publish my Pelican based website, I ended up creating my own command-line utility in Python:

It allows to automate some common tasks like reducing width/height, reducing the number of colors in PNG images, converting PNG to JPEG, and saving optimized versions (as far as Pillow allows) of those files. It works on a single image or in a folder of images.

What do you people use on Haiku? Is there anything like ImageOptim?


Batch convert files using translators
#2

Opinion: Coming from image parsing in other os

Repo has imagemagick, just with that you can throw the convert command and do whatever you want (including folder wide commands).

https://www.imagemagick.org/script/command-line-processing.php

In any case, you will probably end using that, cimg, higher level options like opencv or some weird libs (for me).

Btw, last time i had to do mass operations with images i used pillow to load, process and compact ~60k images into a binary blob for neural networks… Seems like you always end using python + some image lib in C.


#3

Right. As I said in another thread around here, Python is a cool language, provided that the ecosystem is available :slight_smile: for this kind of tasks, Python allows us to have a higher level abstraction and still benefit from the speed and technical expertise coming from compiled packages like Pillow.


#4

You can use my imagemagick gui to optimize your images

Or my mass picture conveter

Http://software.besly.de

And some Tricks and Tips on besly knowledge base

http://besly.de/index.php/en/painting/imagemagick/imagemagic-tips-and-tricks


#5

Nice gui for the software. I knew Imgick will appear on some of the real people on the topic :stuck_out_tongue:


#6

I think we have packages for optipng and pngcrush (both command line apps). If we don’t, let me know and I’ll let our GCI contestants work on it.


#7

Nice to know, could be included my gui too


#8

optipng and pngcrush are in HaikuDepot.
There’s also a OptPNGTranslator that uses optipng. Install it and every native app can save optimized PNGs. Neato!

(@lelldorin: Can you make sure to have the [quote] and [/quote] in your replies are on their own line? Otherwise the quoting doesn’t quite work and I have to edit your post… :slight_smile: )


#9

Ich nutze die Funktion Zitat, muss ich mal drauf achten


#10

What would it take to port ImageOptim to Haiku?

Here are the set of tools it interfaces with (macOS version:

30

Basically, it’s a window that accepts a list of files into it and then there is a minimal interface that has very few configurations, allowing to use these tools without any complication if they are available in the system. I believe some of them were provided by the installer itself, but not entirely sure.


#11

Я люблю лапшу и девочек.


#12

Pasta and girls? Haha :joy:


#13

There is also a builtin WebP translator in Haiku, so people can save/convert their images in this format too.