kernelgpf Posted December 31, 2008 Share Posted December 31, 2008 I'm looking for a bit of code that can overlay a modifiable opacity level layer onto another image, but ONLY where there is another image. So if a tiny rose was in the middle of a 1000x1000 image, I need ONLY the rose, or NON WHITE portions on the image, to be overlayed with the selected color. Any thoughts, suggestions, script bits? TIA! P.S. Does anyone know how to use ImageMagick within PHP? I'm lost. Link to comment https://forums.phpfreaks.com/topic/138951-opaque-color-overlay-script/ Share on other sites More sharing options...
kernelgpf Posted January 1, 2009 Author Share Posted January 1, 2009 Bump. Link to comment https://forums.phpfreaks.com/topic/138951-opaque-color-overlay-script/#findComment-727350 Share on other sites More sharing options...
kernelgpf Posted January 1, 2009 Author Share Posted January 1, 2009 Bump. Link to comment https://forums.phpfreaks.com/topic/138951-opaque-color-overlay-script/#findComment-727598 Share on other sites More sharing options...
kernelgpf Posted January 8, 2009 Author Share Posted January 8, 2009 Bump. Link to comment https://forums.phpfreaks.com/topic/138951-opaque-color-overlay-script/#findComment-732759 Share on other sites More sharing options...
kernelgpf Posted January 8, 2009 Author Share Posted January 8, 2009 Is this impossible? Link to comment https://forums.phpfreaks.com/topic/138951-opaque-color-overlay-script/#findComment-732925 Share on other sites More sharing options...
chronister Posted January 9, 2009 Share Posted January 9, 2009 I would not have a clue on where to begin that except to study like hell the manual for the GD library, or the ImageMagik library. I am not sure how you would be able to automatically detect where the background ends and the foreground image begins. I guess I would look at how to analyze the color spectrum in the image, and maybe assume that pixel 1,1 is always going to be the background color. Then analyze the other pixels one by one and when you find one that is not the same color at pixel 1,1, then assume that it is a part of the foreground image and create a map of that image pixel by pixel. Sounds EXTREMELY difficult, but I am sure somehow it is possible. Thats all I got to offer, sorry. Nate Link to comment https://forums.phpfreaks.com/topic/138951-opaque-color-overlay-script/#findComment-733110 Share on other sites More sharing options...
kernelgpf Posted January 11, 2009 Author Share Posted January 11, 2009 Thanks for anything at all. =) How do you actually use ImageMagick in PHP? I saw the exec("commands here") but I do not know what exec() is or how it works, or how to show images. It permanently changes server-side images, right? That is not what I'm looking for. Link to comment https://forums.phpfreaks.com/topic/138951-opaque-color-overlay-script/#findComment-734510 Share on other sites More sharing options...
chronister Posted January 11, 2009 Share Posted January 11, 2009 I have never used imagemagick, but to the best of my knowledge, it is a server-side tool to manipulate images, similar to the GD library. Yes it can make permanent changes to images same as GD library, so one of the 2 items are what your looking for, but I don't know how to do what you want to accomplish with either one of em. Nate Link to comment https://forums.phpfreaks.com/topic/138951-opaque-color-overlay-script/#findComment-734523 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.