SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    File Optimization

    I have a 1x1 jpg that i use for my site's bg.
    it's rgb is 89,119,155

    As a jpg, it's over 4.5bk. That's just rediculous.

    No matter what i set the compression to in PS, it's still the same size. and playing with the options only drops is half a kb.

    I tried a gif, but it makes the thing purple.

    And i have no clue what the png options do, but when i tried png, it was slightly darker than the jpg

    Any ideas on getting a nice low file size for this thing?
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You want a solid background colour, right? Well don't use a graphic!!!! That takes up a hideous amount of unnecessary loading and refreshing! The HEX for the colour you want is #59779B so just go bgcolor="#59779B".

  3. #3
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)


    Spot the difference: http://www.theoriginalh.com/web.php

    You should really whack the body definition in your css file for nice control though
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  4. #4
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    True -- then you can easily change the bg colour site-wide if you need to.

  5. #5
    The Legend Indian's Avatar
    Join Date
    Nov 2001
    Location
    Gods' Own Country
    Posts
    890
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <off topic>
    http://www.theoriginalh.com/

    H = Hardy?


    </off topic>
    Death --the last sleep? No, it is the final awakening.

    TinyPlanet.org
    Discuss and Debate World Events, Politics and Religion

  6. #6
    Non-Member Siltrince's Avatar
    Join Date
    Aug 2001
    Location
    Belgium
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can a 1x1 image have more then 256 colors ?!!

    You can save anything with less then 256 colors as a .gif file without losing any quality.

    btw I just tested this and a 1x1 jpeg file with 1 color at 100% quality is 512 bytes.

  7. #7
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And bgcolor="#59779B" is 17 bytes!

  8. #8
    Non-Member Siltrince's Avatar
    Join Date
    Aug 2001
    Location
    Belgium
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know Greg but I really don't understand how his 1x1 image could be so "big".

  9. #9
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know -- just teasing!

    He must have been doing something really wrong!!

  10. #10
    Non-Member Siltrince's Avatar
    Join Date
    Aug 2001
    Location
    Belgium
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe he actually used a bigger image and resized it in HTML to 1x1 ?

    just an idea.

  11. #11
    The Legend Indian's Avatar
    Join Date
    Nov 2001
    Location
    Gods' Own Country
    Posts
    890
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Siltrince
    Maybe he actually used a bigger image and resized it in HTML to 1x1 ?

    just an idea.
    No. Its a 1x1 image.

    http://www.webinfractions.com/images/bg_img.jpg
    Last edited by Indian; Aug 9, 2002 at 08:12.
    Death --the last sleep? No, it is the final awakening.

    TinyPlanet.org
    Discuss and Debate World Events, Politics and Religion

  12. #12
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've tried using the bgcolor instead of image, but if someone has different color settings, my images and bg colors won't match.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  13. #13
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    156 bytes ....
    Attached Images Attached Images
    • File Type: gif bg.gif (156 Bytes, 28 views)
    Last edited by TheOriginalH; Aug 9, 2002 at 11:31.
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  14. #14
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most 1x1 gifs I've ever made come under fifty bytes and match the color I want without shifting. Try using the adaptive pallet instead of the "web" pallet.

    I still don't see how you got a one-pixel image up to four and a half K, though! Admittedly, JPGs do some weird things, occasionally, but really... ;-)

    EDIT: Also, if you use a GIF with an adaptive pallet, you could probably make your logo there a GIF and cut down the size (since it's not photographic, JPGs aren't really much help). Then you can make the background area of the GIF transparent and use CSS to color your page's background without worrying too much about color shifting, I think.

    ~~Ian
    Last edited by Ian Glass; Aug 9, 2002 at 11:17.

  15. #15
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    AFAIK a 1x1 image isn't a good idea anyway for background. The "tiling" creates some sort of processor overhead, you're better off using a bigger image (like the one I've attached @ 156bytes ).
    Last edited by TheOriginalH; Aug 9, 2002 at 11:31.
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS


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
  •