Professional Web Applications Themes

creating thumbs, weird colors... - PHP Development

Hi, I'm creating thumbnails by following code. it works fine but the created thumbnails have weird colors, not like the original, why?: Code: //JPG ausgabe $altesBild=ImageCreateFromJPEG($pic); $neuesBild=ImageCreate($neueBreite,$neueHoehe); ImageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe,$breite,$hohe); //$info = getimagesize($neuesBild); //$farbe_b = imagecolorallocate($neuesBild,10,36,106); //imagerectangle($neuesBild,1,1,$info[0]-1,$info[1]-1,$farbe_b); Imagejpeg($neuesBild); ?> Thank you! -- roN www.rideon.ch...

  1. #1

    Default creating thumbs, weird colors...

    Hi,

    I'm creating thumbnails by following code. it works fine but the created
    thumbnails have weird colors, not like the original, why?:
    Code:
    //JPG ausgabe
    $altesBild=ImageCreateFromJPEG($pic);
    $neuesBild=ImageCreate($neueBreite,$neueHoehe);
    ImageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe,$breite,$hohe);
    //$info = getimagesize($neuesBild);
    //$farbe_b = imagecolorallocate($neuesBild,10,36,106);
    //imagerectangle($neuesBild,1,1,$info[0]-1,$info[1]-1,$farbe_b);
    Imagejpeg($neuesBild);
    ?>
    Thank you!

    --
    roN
    www.rideon.ch


    Ron Guest

  2. #2

    Default Re: creating thumbs, weird colors...

    Ron Eggler wrote:
     

    I had this problem when using the GD library. Switched to GD2 and it went
    away. GD2 uses some slightly different functions that use TrueColor.

    --
    +
    srm Guest

  3. #3

    Default Re: creating thumbs, weird colors...

    srm wrote: 
    >
    > I had this problem when using the GD library. Switched to GD2 and it
    > went away. GD2 uses some slightly different functions that use
    > TrueColor.[/ref]

    so I just have to install GD2 from
    http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
    and the Problem should be away?
    Would be great if it was that easy :)
    I'm at work now, that's ehy I can't test it...:( (on our firewall the
    SSH-Port[22] is closed :( )


    Ron Guest

  4. #4

    Default Re: creating thumbs, weird colors...

    Ron Eggler work wrote:
     
    >>
    >> I had this problem when using the GD library. Switched to GD2 and it
    >> went away. GD2 uses some slightly different functions that use
    >> TrueColor.[/ref]
    >
    > so I just have to install GD2 from
    > http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
    > and the Problem should be away?
    > Would be great if it was that easy :)
    > I'm at work now, that's ehy I can't test it...:( (on our firewall the
    > SSH-Port[22] is closed :( )[/ref]

    Well my systems (local and hosted sharing) had GD2 already installed. But
    you have to use different functions - eg, imagecopyresampled instead of
    imagecopyresized and imagecreatetruecolor instead of imagecreate.

    --
    +
    srm Guest

Similar Threads

  1. Creating customs swatches with pantone colors
    By Rene_Perales@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 4
    Last Post: June 8th, 11:54 PM
  2. Weird error message while creating a PDF
    By Vern_C.@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 2
    Last Post: June 1st, 03:26 AM
  3. Colors are going weird with new monitor
    By Bert_Bigelow@adobeforums.com in forum Adobe Photoshop Elements
    Replies: 6
    Last Post: November 5th, 04:41 AM
  4. Colors don't match in photoshop, so weird
    By Esco Grande in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 4
    Last Post: August 3rd, 02:54 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139