Post Reply 

Skript-Fu: saving JPG as little as possible

Apr 7, 2012, 17:28
Post: #1
Question Skript-Fu: saving JPG as little as possible
Hello there,

After a long time of searching and trial and error I ve decided to ask this question:
It is about how to save a JPG using as little space as possible as well as using Skript-Fu. That in fact means just saving Bytes which are directly related to the image itself and avoiding meta informations and what ever else is saved with it.
For comparison reasons I have saved a JPG using the ordinary Gimp GUI (so no Skript-Fu). The result was ok. Unfortunately saving using Skript-Fu did not bring the same results regarding the image size.
The function file-jpeg-save actually comes with most of the parameters available in the ordinary GUI save form however, except "Save EXIF data" and "Save thumbnails".
Well, the EXIF data are no problem. Those are parasite data and parasites can easily be detached from images, drawables and even global settings. And that obviously saves some bytes.
But I could not find anything regarding saving the thumbnail data. So my questions are: Does anyone know how to avoid saving the thumbnails within the image? Are there other data which are not directly image data? And if yes how can i get rid of them? Or maybe is there even a tutorial on how to save jpg as small as possible using Skript-Fu?

Thank you very much in advance,
Find all posts by this user
Quote this message in a reply
Apr 11, 2012, 23:21
Post: #2
RE: Skript-Fu: saving JPG as little as possible
Hello again,
The problem appears to be solved. It had nothing to do with thumbnail data (file-jpeg-save does not save any). It rather is a result of the fact that the values of parameter “subsampling” are counted upside down when mapping them to the comparing parameter of function file-jpeg-save. That means “1×1,1×1,1×1 (best quality) ” in the GUI equals 3 in file-jpeg-save and “2×2,1×1,1×1 (smallest file)” in the GUI equals 0 in file-jpeg-save. For the parameter “DCT method” its the other way around (as you would actually expect it to be). Thats probably a little inconsistency in the Gimp code – but good to know. Btw. I used GIMP 2.6.11.
Find all posts by this user
Quote this message in a reply
Apr 12, 2012, 01:32
Post: #3
RE: Skript-Fu: saving JPG as little as possible
Thanks for reporting, and glad it's solved now.

GIMP user forum here at GIMP Forums. A friendly place to learn GIMP!
Everyone's welcome, feel free to join the community.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Exporting Multiple Layers Into Images (PNG, JPG, etc) SavingMultipleImages 19 11,109 Oct 6, 2014 10:59
Last Post: rich2005
  Gimp Crashes when: Opening A File, Creating A New File, Saving The File and exporting tomayopan 2 557 Sep 1, 2014 21:34
Last Post: tomayopan
  Editing a jpg to replace text without losing background color scheme jon80 2 1,335 Jun 24, 2014 01:37
Last Post: iForStyle007
  Suggestion: PNG and JPG buttons rublacava 1 388 Jun 8, 2014 11:25
Last Post: iForStyle007
  Saving guillotine output bbbman 2 724 Jun 3, 2014 16:46
Last Post: bbbman

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS