LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 07-19-2010, 02:59 AM   #1
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,622
Blog Entries: 29

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
How to reduce the size of an image without reducing its dimensions?


I usually clip the less important parts of an image using GIMP, if I want to reduce its size.

What is the other way of doing it which does not require clipping ?

Kindly guide !

Last edited by TheIndependentAquarius; 04-08-2011 at 06:06 AM. Reason: corrected the title
 
Old 07-19-2010, 03:12 AM   #2
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Rep: Reputation: 41
I'm not sure I understand what you're asking. If you mean the size (in bytes) of an image, when you save the image using GIMP you can change options around for the quality of the image and other things to make them take up less room but maybe not be as high-quality as they were to begin with. Otherwise, I can't think of any way to do it besides cropping the image, or something like that.
 
Old 07-19-2010, 04:25 AM   #3
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Testing/Unstable Amd64
Posts: 1,476

Rep: Reputation: Disabled
Perhaps imagemagick may be what you are looking for:

http://www.imagemagick.org/script/index.php

I have only used this a couple of times myself,so I'm no expert but I did manage to resize the image I needed.
Should be available via you distribution package manager.
 
Old 07-19-2010, 04:32 AM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Try Image -> Scale Image
 
Old 07-19-2010, 05:15 AM   #5
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,622
Blog Entries: 29

Original Poster
Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
the trooper
Thanks, I shall see how ImageMagic works once I have it installed.


Tex,
Thanks, your pointer was helpful. But I saw your profile picture, it is a big picture but definitely it must be of prerequisite size ! How come your picture is big but still fits in there ?

Last edited by TheIndependentAquarius; 07-19-2010 at 05:17 AM.
 
Old 07-19-2010, 05:49 AM   #6
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Well, it has to be square, so I got a larger image, and then cut it out to be square, pasted it as a new image, then scaled it to whatever was needed.
 
Old 07-19-2010, 06:05 AM   #7
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,040
Blog Entries: 52

Rep: Reputation: Disabled
I've only used Gwenview to reduce image size without clipping. There's a Resize option in the Edit menu. Seems to work OK.
 
Old 07-19-2010, 08:37 AM   #8
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
I don't understand whether anishakaul wants to reduce the file size or scale down the image.
 
Old 07-19-2010, 08:53 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Anisha;

There are fundamentally only three ways of reducing the size of an image file:

1. Cropping--discarding part of the image. (I think this is what you mean by "clipping")

2. Down-sampling--reducing the number of pixels used to represent the image. (This reduces the SPATIAL resolution)

3. Compression--reducing the fidelity of the encoding--eg with jpg compression. If an image is in RGB format and you change it to something like indexed color, that would also be considered compression. (Compression normally reduces RADIOMETRIC resolution--ie the acccuracy in depicting color and brightness information)

All can be done with just any reasonable image editor (GIMP for sure) or with Imagemagick.
 
Old 07-21-2010, 12:51 AM   #10
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,622
Blog Entries: 29

Original Poster
Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
Pixel,

Thanks for replying, I shall get back to this thread in a few days.

-Anisha
 
Old 07-23-2010, 07:38 AM   #11
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: *buntu, Vector
Posts: 499

Rep: Reputation: 102Reputation: 102
If file size is the concern, jpeg can compress quite aggressively. You can go down to quality 25 or so and still have the image quite usable.
 
Old 07-23-2010, 08:40 AM   #12
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by cantab View Post
If file size is the concern, jpeg can compress quite aggressively. You can go down to quality 25 or so and still have the image quite usable.
I disagree. Depending on the image, jpg compression at a quality of 25 can look absolutely terrible. For example, try it on an image with a solid object (or text) against a white background.

Semantics:
To me, "image size" means the size in pixels. By contrast, "file size" is the combination of image size and the encoding and/or compression method.
 
Old 04-08-2011, 05:12 AM   #13
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,622
Blog Entries: 29

Original Poster
Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
Quote:
Originally Posted by brianL View Post
I've only used Gwenview to reduce image size without clipping. There's a Resize option in the Edit menu. Seems to work OK.
It made my picture too small just like yours

Quote:
Originally Posted by H_TeXMeX_H View Post
Well, it has to be square, so I got a larger image, and then cut it out to be square, pasted it as a new image, then scaled it to whatever was needed.
I have the rectangle image, cutting it to square doesn't make it look good Even then I squared it off through Gwenview, then you say that I should scale it? Scaling reduces the dimensions and as LQ saya 120 by 120, it is extremely small!

HELP.
There must be some way to preserve the dimensions and reduce the size as well?
 
Old 04-08-2011, 08:27 AM   #14
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by Anisha Kaul View Post
have the rectangle image, cutting it to square doesn't make it look good Even then I squared it off through Gwenview, then you say that I should scale it? Scaling reduces the dimensions and as LQ saya 120 by 120, it is extremely small!

HELP.
There must be some way to preserve the dimensions and reduce the size as well?
So you want to turn a rectangular image into a square image and not clip or stretch it? Impossible, unless you put colored bars on the sides of the image.
 
Old 04-08-2011, 08:41 AM   #15
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,766

Rep: Reputation: 1467Reputation: 1467Reputation: 1467Reputation: 1467Reputation: 1467Reputation: 1467Reputation: 1467Reputation: 1467Reputation: 1467Reputation: 1467
See here:
Batch Resize Images Using Imagemagick - Digital Photography Tips and Techniques

Use mogrify. By default, it scales the image without stretching it. If you want to stretch or squeeze it to fit the new size, then you put an exclamation mark after the resolution. Examples are at the link above.

Last edited by dugan; 04-08-2011 at 08:44 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reduce virtual image size of Linux guest in VirtualBox chris1606 Linux - Server 3 04-14-2009 06:51 AM
How can I reduce and image size with php's GD library? abefroman Linux - Software 1 10-18-2005 11:29 AM
help me reduce my OS size =/ xushi Slackware 29 12-01-2004 11:45 AM
reduce the kernel image size further abirami Linux - Networking 1 10-05-2004 10:06 AM
Using Gimp to reduce size of image for web esteeven Linux - Software 2 10-01-2002 09:08 AM


All times are GMT -5. The time now is 11:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration