|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-02-24 16:41 UTC] arebroff at rogers dot com
This code outputs picture but it is not in grey palette and it does not depend on $transition.
Why?
How do I need transform it to get image in black-and-white?
-----------------
$old=@imagecreatefromjpeg("userspictures/2.jpg");
$transition=0;
imageCopyMergeGray($old, $old, 0, 0, 100, 200, 300, 400, $transition);
Header("Content-type: image/jpeg");
Imagejpeg($old, '', 80);
-----------------
Thanks for any help.
Alexei
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 26 23:00:01 2025 UTC |
I changed my code but new one does not work at all! I have to mention that imageCopyMerge vs imageCopyMergeGray works good in same function. ----------------------------- $old=imagecreatefromjpeg("userspictures/2.jpg"); $new=imagecreatefromjpeg("userspictures/3.jpg"); imageCopyMergeGray($new, $old, 0, 0, 50, 50, 50, 50, 100); Header("Content-type: image/jpeg"); Imagejpeg($new); -----------------------------