gd library bug? image lost colors

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • |

    gd library bug? image lost colors

    hi,

    is it a php bug or i do smth wrong?

    From site



    I`m taking images (those thumbs) and its name at right.

    Then i generate with those elements png image

    I make big ligh yellow rectangle with smaller rectangle: once grey, once
    white. At those rectangles i put names (with ImageTTFText) and images
    (imagecreatefro mjpeg).

    And finall image look... ugly. Look at this, most colors are lost

    Profesjonalne usługi hostingowe dla firm oraz osób prywatnych - Hosting WWW, Poczta e-mail, Antyspam AI, PHP, Serwery MySQL, Serwery VPS, Rejestracja domen polskich, globalnych, narodowych, Sprzedaż Certyfikatów SSL


    I have to admit that if i do not attach thumb images, colors are good.

    Can i fix something or i it is libgd bug?

    --
    body {
    name: '|<oñrad Karpieszu>|';
    visit: url('http://www.vivamozilla .civ.pl');
    }
  • neur0maniak

    #2
    Re: gd library bug? image lost colors

    It would be useful to see a snippet of code to see what is happening.

    Though, my best guess would be that you're copying images from a http
    source into an image created at run-time, and that the base image that
    you're copying all the images onto, is a palette based image

    i.e., imagecreate() vs. imagecreatetrue color()



    |<onrad wrote:[color=blue]
    > hi,
    >
    > is it a php bug or i do smth wrong?
    >
    > From site
    >
    > http://www.allegro.pl/show_user_auctions.php?uid=45432
    >
    > I`m taking images (those thumbs) and its name at right.
    >
    > Then i generate with those elements png image
    >
    > I make big ligh yellow rectangle with smaller rectangle: once grey, once
    > white. At those rectangles i put names (with ImageTTFText) and images
    > (imagecreatefro mjpeg).
    >
    > And finall image look... ugly. Look at this, most colors are lost
    >
    > http://www.linux.webd.pl/allegro/
    >
    > I have to admit that if i do not attach thumb images, colors are good.
    >
    > Can i fix something or i it is libgd bug?
    >[/color]

    Comment

    • |

      #3
      Re: gd library bug? image lost colors

      Dnia 11/01/2004 09:05 AM, U¿ytkownik neur0maniak napisa³:[color=blue]
      > i.e., imagecreate() vs. imagecreatetrue color()[/color]

      bingo! when i use imagecreatetrue color everything works great!


      --
      body {
      name: '|<oñrad Karpieszu>|';
      visit: url('http://www.vivamozilla .civ.pl');
      }

      Comment

      Working...