SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Jan 2012
    Posts
    261
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Converting JPG to GIF or PNG (Reducing File Size)

    I've downloaded many very simply images (in the public domain, of course) that were surprisingly JPGs, rather than PNGs or GIFs. I assume they were created by people who didn't know what they were doing, as the file sizes are often ridiculously big.

    For example, I recently downloaded a map that consists of just three colors - the background color, black (text and national borders) and the color red indicating an animal's distribution. The file size should be less than half than what it is.

    But when I copy it into a new Photoshop document, then try and save it as a GIF or PNG, the file size is still big, sometimes even bigger.

    So, is there a way to convert such images to PNG/GIF and reduce the file size? Though I've used Photoshop for a long time, I've never really mastered the details, so there may be a simple solution(s) I simply haven't stumbled over yet.

    Incidentally, I'm using CS3.

    Thanks.

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,806
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    The problem is how JPG compression works. If you have had these originals you would experience such issues.

    JPG makes 250something different artifact patterns and compresses based on those. So although you may perceive only 3 colors there are actually many more. ( thsi makes magic wand selection of JPGs a b*tch too, BTW). You may need to edit the color table of the GIF/PNG(that gives you more control).. or for a rough idea POSTERIZE to 3 colors (or however many you perceive) then save for web.

    ALSO, in the case of PNG24 , note that the format adds an extra layer even w/o any transparent or semi-transparent pixels, and one which PS wont remove . You may need a separate utility for that. But if your image doesn't require semi-transparency consider gif/png8 as a format and editing the color table down.

  4. #4
    SitePoint Addict
    Join Date
    Jan 2012
    Posts
    261
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wasn't even aware of Photoshop's Posterize function; that should be a big help. I'll check out your links, too, logic earth. Thanks for the tips!

  5. #5
    Non-Member rususorinvick's Avatar
    Join Date
    Feb 2012
    Location
    Iasi
    Posts
    24
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    well, you could always use a free image editor, i peronally used irfan's editor to batch convert files, but if you can afford it, you can go with photoshop too...i guess...

  6. #6
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,843
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    @Mae Rose

    The latest Photoshop CS6 Beta is for free - only about 1.6 gig download I do not know if the beta version is free forever or is limited.

    Check out http://www.sitepoint.com/forums/show...Released-Free!

    Photoshop has a wonderful option available File->Save for Web or using the shortcut: Alt+Shift+Ctrl+S

    Numerous options are available and each selection has a preview with associated file size along with estimated time to save at a particular baud rate.
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Patche on earning Member of the Month for July 2014

  7. #7
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by John_Betong View Post
    @Mae Rose

    The latest Photoshop CS6 Beta is for free - only about 1.6 gig download I do not know if the beta version is free forever or is limited.

    Check out http://www.sitepoint.com/forums/show...Released-Free!
    Once it gets out of beta and into normal-ness, it'll be commercial.

    ~TehYoyo


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •