RE: [PHP] How to add a new color to JPEG

From: Date: Tue, 10 Jul 2001 23:20:35 +0000
Subject: RE: [PHP] How to add a new color to JPEG
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57261@lists.php.net to get a copy of this message
How can I add colors to JPEG-palette? I never new It had a special palette (until now :). -----Original Message----- From: James Cox [mailto:james@wherewithal.com] Sent: 10. júlí 2001 22:38 To: Jeff@Hyrum. Net Cc: sed@sed.is; Php-General@Lists. Php. Net Subject: RE: [PHP] How to add a new color to JPEG hmm. If what I understand from your ImageColorClosest(); function, why don't you just add yellow to the palette? that way it can be found by the function, but isn't used in the image? HTH, James Cox apologies jeff for sending it twice to you :) > -----Original Message----- > From: Jeff Lewis [mailto:jeff@hyrum.net] > Sent: 10 July 2001 23:00 > To: sed@sed.is; php-general@lists.php.net > Subject: RE: [PHP] How to add a new color to JPEG > > > Hmm, I create my image from scratch and haven't tried drawing on an > existing pallette. If your start image is always a blank black box > you could always > create it on the fly... > > > -----Original Message----- > > From: SED [mailto:sed@sed.is] > > Sent: Tuesday, July 10, 2001 1:52 PM > > To: jeff@hyrum.net; php-general@lists.php.net > > Subject: RE: [PHP] How to add a new color to JPEG > > > > > > That’s the problem, if I do that and the color is not used before in > > the image, I get only the closest match. Note, if I add a yellow > > pixle into the JPEG-image with Photoshop, save it and try it again, > > then I can use the yellow for my text. However, I don’t want to have > > the yellow dot in my picture, only a yellow text. > > > > SED > > > > -----Original Message----- > > From: Jeff Lewis [mailto:jeff@hyrum.net] > > Sent: 10. júlí 2001 17:26 > > To: sed@sed.is; php-general@lists.php.net > > Subject: RE: [PHP] How to add a new color to JPEG > > > > > > Could try this: > > > > $blue = ImageColorAllocate($image, 0, 0, 255); > > > > Substitue blue for yellow and you'll be the appropriate RGB values > > for the numbers. > > > > Jeff > > > > > -----Original Message----- > > > From: SED [mailto:sed@sed.is] > > > Sent: Tuesday, July 10, 2001 1:27 PM > > > To: php-general@lists.php.net > > > Subject: [PHP] How to add a new color to JPEG > > > > > > > > > Lets say I have a black JPEG-image and I want to add yellow text > > > to it, how can I define the yellow color? > > > > > > According to the manual, you can only get closest value of your > > > desired color by letting the ImageColorClosest() find it. > > > Therefore, if the image is totally black, you can not get the > > > yellow color. I have not found a way to do this though I believe I > > > have tried everything. And yet, I have not found any documents > > > covering this other than PHP-manual. > > > > > > Do you know of a way to do this? Or do you know of other > > > manuals/tutorials covering this issue? > > > > > > Regards, > > > Sumarlidi Einar Dadason > > > > > > SED - Graphic Design > > > > > > ------------------------------------------ > > > Phone: (+354) 4615501 > > > Mobile: (+354) 8960376 > > > Fax: (+354) 4615503 > > > E-mail: sed@sed.is > > > Homepage: www.sed.is > > > ------------------------------------------ > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net To > > > contact the list administrators, e-mail: > > > php-list-admin@lists.php.net > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net To > > contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net To > contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#57261) next »