SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => Tips, Tricks and Tutorials => Topic started by: rickmastfan67 on October 26, 2007, 03:31:22 AM

Title: JPG compression, The how-to's to save space and keep the picture looking good
Post by: rickmastfan67 on October 26, 2007, 03:31:22 AM
Hey guys.  I thought I would write up something like this because I've seen several pictures that some of you guys have taken in SC4 or pictures you've created yourself that are over 500k.  To be honest, you don't have to have images that big in file size.  Some of you think that the higher the quality, the better.  That's true in some cases.  Sometimes you need an un-compressed JPG for something (Example: a NR2003 template shouldn't be compressed before you render it in 3dsMax, however, the final product that you get from rendering can be).  Other times, you don't (like in a forum post).  Plus, if you can even compress the image just a tad, dial-up users around the world will thank you (I'm one of them connecting @ 26.4Kbps).

Here in this post, I'll be showing you 2 ways on how to compress your images, and still keep the quality looking as close as possible to an uncompressed image.  So, let's begin guys. ;)

NOTE: The ways I'm showing you guys how to do it is in Paint Shop Pro 7.  Other programs might do it a tad differently, so look around at your options in the program to find out how to do it in it.

=====

First, we'll go the simple way.

1. To start, you'll want to have an image you've just taken in SC4 that's on your clipboard via the Print-Screen button like so. (I'll use my personal NR2003 car as an example.)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fpic1.jpg&hash=bab6c3ca593870002c33a2ddb302532d9a9ebede)

2. Next, you hit the F12 button to open the "Save As" feature (might be different on your program), and find "JPG" in the "Save as Type" area.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fpic2.jpg&hash=1ed818b0a0b6c0de48a35fcfe94e2b28c7dad1ac)

3. Now find the "Options" button and click it. (I highlighted it in red)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fpic3.jpg&hash=c1f6b1c60fcb19511daa0dcfcf14784f93343745)

4. An option window should now have popped up similar to below.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fpic4.jpg&hash=9bf93243675d1715c387715dfb1d9b08851f08d2)

5. Now, you see the "Compression Factor" area.  Change the 1 (or whatever it might be set at) to a setting of 12.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fpic5.jpg&hash=4248a600e3d809beefa00db1ceeea037b8a57c2f)

6. After you have done that, hit the "OK" button and you'll be taken back to the "Save As" screen.  Now save the image where you want to save it like you normally would.  And that's all you have to compress your JPG this way.

Bonus: Now, here's a real example of how the JPG compressing works.  Here's the #67 car of mine you saw in step one saved @ compression setting 1, @ compression setting 12, and @ compression setting 18.

File size @ compression setting 1: 296 KB (303,926 bytes)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2F67Woody_compression1.jpg&hash=e28e675e2af52dafe012ddcb619b5e8b6bbff42a)

File size @ compression setting 12: 129 KB (132,509 bytes)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2F67Woody_compression12.jpg&hash=2c18877ed8b6ea05ac02c5dd46f4668d906c8b0f)

File size @ compression setting 18: 105 KB (107,820 bytes)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2F67Woody_compression18.jpg&hash=9fd790f3d2947ab70c1628ded9d6f263a66889a2)

That's a savings of 167KB between 1 and 12, and a savings of 191KB between 1 and 18!!!  And they look practically the same.  The only way you could see a difference between all 3, is if you saved all three and then opening them up in separate windows, then zoomed in a ton, and then compared.  Now, the higher the number in the compression setting, the worse the picture is going to get.  So, you mostly will want to go no lower than 20 unless you can't help it.

=====

Now, onto the second way of doing this.

We're going to pick up again right after step 1.

2. Go into "File".  Find "Export", and then "JPEG Optimizer".
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fpic2A.jpg&hash=c0cd02e60b4172e237f0d66a3ba6b48d707572de)

3. Now, something like this below should now have popped up.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fpic3A.jpg&hash=b9e814029104001a4eefe300906e007b1fe29288)

4. Change the "Set compression value" to 12.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fpic4A.jpg&hash=a2a9797d55fb764b21f51e4ea97e5663432d8521)

5. Now click on the "Format" tab. (highlighted below)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fpic5A.jpg&hash=57f5524c632f0c70397c9cf194f237bbe2c7b6f1)

6. Now select the type of format you want, Standard or Progressive.  The Progressive type can sometimes save you a few extra KB, but not always.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fpic6A.jpg&hash=d7a4fde264752ffa7fc99af689bcea71c6ace2bd)

7. Click OK and now save the image where you want to save it on your computer. 

Now, doing it this way will take you a tad longer; however, you do get a preview of what the final image will look like, unlike the quick way I showed first.  But the images will come out the same size both ways as long as you select the same settings.


Well, that concludes this How-To on JPG compression.  I hope you guys found it useful and will put it to good use to help cut down unnecessary file size that you load some of your images up with.

If you have any comments or questions about this, please, don't hesitate to make a post here.  I'll help you out if ya need it. ;)
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: jeronij on October 26, 2007, 04:46:54 AM
Thanks for sharing this technique rick  :thumbsup:


I use it often, and it is really useful  ;)
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: rickmastfan67 on October 30, 2007, 02:10:44 PM
Glad to be of service.

And for you 500k+ picture posters, even if you compress to setting 5, you'll be saving a good chunk of space and will hep out out dial-up users.  Any reduction in KB will help us big time, even if it's only 50k. :thumbsup:
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: Chrisadams3997 on October 30, 2007, 02:47:01 PM
Woohoo, another PSP7 user!  I've actually got the Jpeg optimizer added to my standard toolbar ;), saves me a few clicks.
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: Shadow Assassin on October 31, 2007, 05:23:56 AM
Might want to also point out that in certain situations, PNG files are actually much more efficient at keeping file sizes down than JPEGs (and they're lossless too). When dealing with images such as signs, which only have a few colours, PNG is often the better way to go. But for everyday shots, such as SC4 pics, JPEG is a must.
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: rickmastfan67 on October 31, 2007, 03:07:30 PM
Quote from: Shadow Assassin on October 31, 2007, 05:23:56 AM
Might want to also point out that in certain situations, PNG files are actually much more efficient at keeping file sizes down than JPEGs (and they're lossless too). When dealing with images such as signs, which only have a few colors, PNG is often the better way to go. But for everyday shots, such as SC4 pics, JPEG is a must.

Yes, I fully agree with you there SA.  PNG's are good some for somethings and bad for others.  Here's a quick example on that subject:

NOTE: This is a logo re-creation that I did of a logo.  I DID NOT MAKE THE ORIGINAL one that is used on their product.

Logo in JPG format is 123 KB (126,080 bytes) @ Compression setting 1:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fwide_open.jpg&hash=2587f222bc57fb8183d6dc646c7947d2a2c151b4)

Logo in PNG format is 90.7 KB (92,959 bytes):
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv645%2Frickmastfan67%2FJPG_compression_info%2Fwide_open-1.png&hash=eb3a2eb20abf9366318af418f5210f9a791e3a9f)

Now, as SA said above, PNG FORMAT IS NOT WHAT YOU WANT TO SAVE YOUR SC4 IMAGES IN.  JPG format is what you want to use.
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: dragonshardz on November 01, 2007, 06:18:23 PM
What about those of us who only have Microsoft Paint?
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: rickmastfan67 on November 01, 2007, 06:30:35 PM
Quote from: dragonshardz on November 01, 2007, 06:18:23 PM
What about those of us who only have Microsoft Paint?

I recomend saving the image as a PNG in MS Paint and then convert it to JPG the way Vester mentions in this post:
http://sc4devotion.com/forums/index.php?topic=2764.msg86356#msg86356
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: Andreas on November 02, 2007, 02:17:14 AM
Quote from: dragonshardz on November 01, 2007, 06:18:23 PM
What about those of us who only have Microsoft Paint?

You can download IrfanView, XNView or The GIMP, which are all freeware and do a lot better than MS Paint.
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: dragonshardz on November 02, 2007, 08:57:40 PM
I got IrfanView, but I have yet to set it up. Is there a specific way I have to convert/compress the .PNG's, or can the tutorial already posted be adapted to IrfanView?
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: rickmastfan67 on November 03, 2007, 01:59:43 AM
Quote from: dragonshardz on November 02, 2007, 08:57:40 PM
I got IrfanView, but I have yet to set it up. Is there a specific way I have to convert/compress the .PNG's, or can the tutorial already posted be adapted to IrfanView?

I don't know.  I do all of my image editing inside of PSP7.  However, if you can tell me how big the download is, I'll consider downloading it and seeing if I can add the process to my tutorial above.
Title: Re: JPG compression, The how-to's to save space and keep the picture looking goo
Post by: vester on November 03, 2007, 03:13:33 AM
Open the image in Irfanview, click s (save as) or ctrl + s.(save) Go down in the fileformat and pick out jpg (you could press j twice in the roll down).
Most of the time I save with the setting Save quality to 60 pro cent.

Really nothing to it.
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: dragonshardz on November 03, 2007, 08:02:41 PM
k, thanks guys. oh and the dl is...

<wanders off to check>

... 1.10 MB. So this tutorial is basic, general, and should work with any image editing program beyond MS Paint. Good, now it won't take forever and a day to upload pics.
Title: Re: JPG compression, The how-to's to save space and keep the picture looking good
Post by: SimRabbit123 on November 17, 2007, 07:49:14 AM
Photoshop can also do that.

Just save your image/picture to "Save to Web".
It works really great  :thumbsup: