Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I've managed to take a .png screenshot image of my desktop and I'd like to send it to a website that displays desktop screenshots, but my image is 1,3 MB in size and the website accepts only images that are smaller than 300 KB. I've got Gimp installed and I can use it to view the image, but I cannot figure out how I could use Gimp to compress my screenshot image to make it smaller than 300 KB. I have zero experience in manipulating graphics, so any advice to help me get started would be very much appreciated.
Click Image> Scale Image and reduce the size of the image in pixels. Then save it as a jpeg. Click File> Save as> Select File Type and reduce the quality
Keep in mind that jpeg uses (very) lossy compression (it throws out details the algorithm thinks is not important) whereas PNG uses lossless compression. If you want to retain high definition in your photographs stick with the PNG format. If detail is not all that important then by all means jpeg may be the right option for you.
BTW: screenshots look particularly bad when saved as jpeg (as does all line art) so you may want to save as either a dithered eight-bit PNG file or as a dithered GIF file. It will be limited to only 256 indexed colors but rather than throwing definition out, those algorithms will resample the colors, pick the best 256 (well, 254 plus black and white) and dither the coloring, while retaining the sharp lines of your screenshots.
As far as using compression with PNG in The Gimp, which is the question you asked, do the following (as of The Gimp 2.0.0):
Click File -> Save As
Select "PNG" in the Determine File Type
Enter your filename and click OK
Next you will see a "Save as PNG" dialog - in here you can set various options, including the compression level. I'd avoid interlacing as it increases the file type slightly, and since most people are on broadband now there is little benefit to interlacing raster images.
Saving my screenshot in .jpg format reduced the size from 1.3 MB to 175 KB. Then I tried .png with indexed colors, choosing "Use web-optimized palette" in Gimp. This produced a 200 KB image but the colors don't look very good (at least on my screen). Then I tried indexed .png with the "Generate optimum palette" in Gimp and this produced a better-looking image, but the size is 484 KB (too big). The website in question accepts both .jpg and .png images, so I think I'll just upload the .jpg version of my screenshot. Many thanks!
I found having to open up a large application like Gimp just to resize an image, took more time than I wanted to use when dealing with this kind of situation. I'm often needing to resize an image. Then I found out about the power of ImageMagick and wrote a little bash script so that at the command line I could simply type:
resizeimg <filename> to get a smaller image created.
If you're interested, you can find the script and instructions here:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.