Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compress Picture
#1
Hi,
Have done a quick search through the Forum, plus have checked my User Manual but cannot find anywhere that tells me if I can compress a picture.
I thought I saw it yesterday while editing a pic but now for the life of me I cannot seem to find what it was I THOUGHT I saw!
Any help please!!   Big Grin
Reply
#2
When you use SAVE, instead of using the .xcf extension use .xcfgz
Reply
#3
(08-22-2017, 01:13 AM)ozdoug Wrote: ...snip... cannot find anywhere that tells me if I can compress a picture.

Define compress.
I assume same as Blighty that you want a smaller file size and that depends on image format. 
Exported as PNG, lossless compression and already maxed out.
Exported as JPG, lossy compression and a default value of 90.
Both described here: https://docs.gimp.org/en/gimp-images-out.html

But then you can make the image size (in pixels) smaller, which you could say is a form of compression.

Sometimes both are combined to get an image down to a specified file size and there are plugins to assist.
Save-for-Web is one http://registry.gimp.org/node/33
Reply
#4
Many thanks Rich & Blighty.

I read through the suggested manual sections, & had a bit of a play around with the options mentioned. 
The ultimate aim of this search is that I am trying to make a montage of probably 3 or 4 portraits in a single picture file. Ideally I would like the final result to have each individual picture come out in the same quality as the originals that were used to make the montage. My first attempts always come out at a lower quality which I checked by just zooming in & comparing pics. 

Basically what I am doing is opening a Word doc, drag/drop the pics to sit alongside each other, then save as a PDF file. Open PDF file in GIMP, & also opening the files with a Resolution of 450 pixels/in (from trial & error).
From their it is Autocrop to remove the borders then Export.......

The Word to PDF conversion is what seemed easiest as I was struggling to do the same with GIMP, but if it is relatively simple then I could try it the GIMP way!

All advice greatfully appreciated!   Big Grin


Attached Files Image(s)
   
Reply
#5
(08-23-2017, 01:04 AM)ozdoug Wrote: Basically what I am doing is opening a Word doc, drag/drop the pics to sit alongside each other,

What I am not sure of:

Do the pics already exist in the Word doc and you are extracting them from there to use elsewhere?
or
Are you putting the pics into the Word doc so that you can position them?
Reply
#6
The quality of the images in the Word PDF will depend on if the image(s) are scaled a significant amount. Exactly the same applies to Gimp but here do do have a degree of control, formatting the image before including in the montage.

Bottom line. Scale an image down, throw away pixels, lose quality. Scale an image up, guess (interpolate) pixels, lose quality.

Image Resolution of PDF
Open a PDF in Gimp and the default pixels-per-inch (ppi) is 100. Usually that is too low, set it to 300 ppi to get a better comparison. 450 ppi is a bit over-the-top. probably your images are very large and have been scaled down considerably in Word.

Quite a few operations covered by this topic so a quick video.

https://youtu.be/2tBf2TO5KeA Duration 7 mins What does it show? I use linux so it has to be LibreOffice (LO) rather than Word

Quick look at assembling in LO
Open the PDF in Gimp
Compare the Images.
Make the same montage using Gimp
Export the montage as a PDF from Gimp
Check the file size(s).

That last item because Gimp does make large PDF's. You get one large image in a PDF wrapper. Which brings up 'purpose' If this is a means of archiving your images, do not do it. Keep the images as close to original as possible. For other purposes, if you can accept the large file size and get a better quality, use Gimp.
If there is a lot of text and annotations involved, better off using Word (or a DTP application such as Scribus if the PDF is going for publication.) Generally the file size will be smaller.
Reply
#7
Rich, Blighty,

The Images are seperate jpg files, which I drag/drop on to a blank Word doc. 

I then drag the corners of the images in to fit them all (usually 3 at the moment) inside the Word doc. I keep the same aspect ratio, I just pull the corners in to shrink the images.

I then Save As a PDF file which I then open in GIMP. 

When opening in GIMP I have been using a resolution of 450 ppi. When I Export the PDF file as a JPG file I find gives me good resolution & usually a multiple of the original images that I put on to the Word doc. Example: If I drag/drop 3 x images of around 400kb each, open with Resolution of 450 PPI, then the final Exported JPG file from GIMP usually gives a file of around 1200kb/1.2mb, which is what I would expect from a file composed of 3 x 400kb images. 

I have also experimented with bringing the PDF file in to GIMP with higher pixel resolutions which of course results in a larger Exported file, but I still seem to be losing some of the crisp resolution of the original images when I do my 'zoom in' check.............

I may be chasing my tail here as it would seem that some picture quality is inevitably lost when you 'process' picture files, but I wanted to see if there was a way in GIMP to produce the save end file & perhaps hold on to the original picture quality.   Undecided
Reply
#8
Rich, Blighty,

I would think that if I was using GIMP I would be looking to import a pic file, then join/merge another to it to create a montage type thing. I'm sure that is possible in GIMP?........   Undecided
Reply
#9
I think your workflow is all wrong.
jpeg > word > pdf > Gimp > jpeg

You should work in Gimp only.

Open Gimp with a large canvas size. Can be larger than necessary. White or transparent background, depending on your needs. Let's say your 3 images are 1000 x 1000 pixels each, then choose a canvas size of say 3500 X 1500 pixels.
Now open the 3 images, each one on its own layer.
(Alternative: Use (File > Open As Layers), select all 3 images, then adjust canvas size afterwards)

Now use the Move tool to move each image into the position you want. (Remember that each image is on its own layer, so you are actually moving the layers around on the canvas.). You can also Scale individual images to suit your needs.

Use the Crop tool to crop any unused canvas space.

SAVE as xcf. This will preserve your layers. EXPORT as jpeg.

If necessary, you can resize the entire image to suit your needs.

No need to use word or pdf. That can result in unnecessary quality loss.
Reply
#10
Open a base layer and open images as layers, then scale layers - was shown in the video. (0 views, that was a waste of time Wink )

As before, scale up or down by an appreciable amount will result in some degradation of the image.

If the individual images are very large then process each individually.

Do a little planning and determine the image size required for your background. I still recommend one of the Gimp presets, These are already set to 300 ppi for printing if you need to print, anything more than 300 ppi is overkill. Open one up and set a few guides up to determine sizes in pixels

Scaling down each image can be improved by a small pre-blur. Any borders etc, can be cropped at this stage. A final sharpen can be used. Then save these as .xcf files.

Open up your blank background image, Open-As-layers to import those .xcf files. Keep adjustments at this stage to moving the layers, adding decorations, text..

When finished save as an Gimp xcf file. It will be large, going back to the original question on file size, that A4 2480 x 3508 pix equals

gimp xcf 16 MB compressed xcfgz 12.5 MB
export as png (lossless) 9 MB
export as jpg (85 quality lossy) 1.3 MB

Just my view on the subject, lots of other ways.
Reply


Forum Jump: