Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just received my new eeePC with Linux and plan to use it for travel. Would like to download pictures and then share with family through email. While I have resized jpgs with Windows for years, I have not figured it out with Linux. Is there a way to change a 570 kb to a 57kb jpeg with Linux or do I need additional software? And if so, what is recommended and easy? Thank you.
There is probably a better way than what I do, but I open the original in the 'GIMP', select 'save as' choose 'jpeg' and use a "quality factor" of around 32. That can shrink 2MB to 78KB (it really depends on the picture). I find that most times values below 32 give too many artifacts and poor color.
Or you could reduce the Resolution ... in GIMP you would do this by scaling the Image, I dont know from the Top of my head but there is a Option "Scale" in the MEnu somewhere, where you can enter the new resolution and then Save as... Or combine the 2 Scale the Resolution and the Quality.
If you have an ImageMagick package installed you can use the "convert" program to resize photos as well.
This will resize all jpeg pictures in the current directory.
Code:
for photo in *.jpg; do
convert -resize 25% "${photo}" small-"${photo}"
done
You could instead use "-resize 100x" to resize the photos to a width of 100 pixels, yet keeping the aspect ratio.
Using "-resize "500x>" will reduce the size of pictures that are more than 500 pixels wide, but leave smaller pictures alone.
The ImageMagick package installs html based instructions in /usr/share/doc/ImageMagick-<version>/www or /usr/share/doc/packages/ImageMagick/www, depending on the convention that is used in the eeepc.
you can also play with the quality. jpegs size decrease very quickly for a small quality decrease, which is not noticeable by a human.
For a compression level of 90:
convert -quality 90 -resize 25% "${photo}" small-"${photo}"
I use convert
-geometry "50%x50%"
but there is also -scale and now I see that there is resize also.. not sure what the difference is.
If you are using KDE, there's a beautiful set of scripts called KIM (Kde Image Menu) by Charles Bouveyron.
KIM is a "front-end" to imagemagick: In konqueror R-click in an image file - Actions- KIM Convert (between formats) / Resize (filename is renamed as filename-resized), even publish as html, flash animations etc. It is perfect, and easily customisable / extensible. I like it very much. It is also a good example of how to make your own KDE servicemenus.
There is a package of image utilities called ImageMagick. One of the programs, convert allows you to easily convert from one format to another or to resize pictures.
example:
convert rose.jpg -resize 50% rose.png
You can easily convert a batch of pictures:
Code:
#lets create a destination directory
mkdir small
#resize all jpeg pictures in the directory to a width of 256 pixels
for picture in *.jpg; do
convert "${picture}" -resize -x256 "${picture%.jpg}"-s.jpg
done
If you have ImageMagick installed you may have html documentation installed in /usr/share/doc/ImageMagick-<version>/.
Using the information sent out, I was able to plod my way through and was able to take a jpg from 557KB to 84KB. This is what I did:
In Photo Manager R-Click on a picture to resize.
Select---External Tools----Kolour Paint
In Paint Select the pull down file "Images"----Resize/Scale
Choose Smooth Scale, "X" Keep Aspect Ratio, Scroll to 50%, "ok"
Under the pull down for File----Save As---Rename the file (I just put an "e" in front of the name to designate it as an emailable file.) It will ask if you really want to: "Yes"
Thanks for the help. Now my little eeePC will be a great addition to our trips.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.