This is a discussion on Image handling in php within the PHP Programming forums, part of the Web Development category; Hi Friends, As in my previous discussion about image effect and artism there is few really important command available in ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi Friends, As in my previous discussion about image effect and artism there is few really important command available in Magick functionality. Colorizing is the process of blending the color of each pixel with a specified color. The argument to the effect is the color to blend with. This can either be specified as a percentage (which will be used for each of red, green, and blue) or as three percentages. It is also possible to provide either one of three actual values. convert -colorize 255 input.jpg output.jpg The implode effect simulates the center of your image being sucked into a virtual black hole. The argument is the amount of implosion effect you desire. convert -implode 4 input.jpg output.jpg These two image manipulation command will generally used for negative image creation and scenaric presentation. Thanks |
| Sponsored Links |
| |||
| We can use some kind of negative effect too in images with some command line argument. Like solarize. Solarizing is an effect that occurs when a negative is exposed to light part way through the photographic development process. Here, the input argument is the intensity above which to apply the effect, either specified as an absolute value, or as a percentage of the maximum possible value for the pixel. If a pixel is above the threshold, then it is negated. convert -solarize 10 source.jpg destination.jpg Another command is Spread. Spread moves pixels by a random amount within the image. The argument is the size of the area around the pixel from which to select the new location. It therefore specifies how closely the output resembles the input: convert -spread 3 source.jpg destination.jpg We can use the multiple command in one statement. For example to use sample, spread and charcoal we ca use this statement. convert -sample 25%x25% -spread 4 \ -charcoal 4 input.jpg output.jpg we want to make a thumbnail of an image, and then apply a spread to it. Once the spread has occurred, we'll apply the charcoal effect. Thanks |
| |||
| Hi Varghese, Here is the link which give you most of the magick function information. PHP: Imagick Image Library - Manual It give you all the magick fore ground functions. Hope that help to you. Thanks
__________________ K K Venkata Charya Success is easy to get but difficult to retain |
| |||
| Hi Friends, Here we going to discuss about some of the Image Magick functions which is commonly used in fore ground. There is no command line functionality here. We already discussed few functions in same thread like Imagick_readimage(): To read any image Imagick_writeimage(): To save any image Imagick_sample(): To create a thumbnail of any image with specified size. Imagick_setdpi(): To set the resolution of the image. Imagick_convert: TO convert the image type like JPG to PNG etc. Now here we going to discuss about create multiple image with same class object. In many place we like to use list of image without creating some many instance and want to use that some concept like stack. Magick provide a option like push and pop. To insert many images in one object we can use the method called imagick_pushlist($vConstantHandler,$vDifferentHand ler); Thanks
__________________ K K Venkata Charya Success is easy to get but difficult to retain |
| |||
| Hi, To write a Text on any image there is some set of functions we need to use to implement on any image with text. imagick_setfontface() - Set Font style imagick_setfillcolor() - Set Font Color imagick_setfontsize() - Set Font Size imagick_drawannotation() - Set X and Y coordinate with desired text Example is as follow: Imagick_setfontface( $handle, "Palatino-Bold" ) Imagick_setfillcolor( $handle, "#990000" ) Imagick_setfontsize( $handle, 50 ) Imagick_drawannotation( $handle, 325, 100, "Example Text" ) Thanks
__________________ K K Venkata Charya Success is easy to get but difficult to retain |
| |||
| hi I have a problem in image rotation. I have one orginial image like 240 degree and saved this with new image name like Original image area reduced and it contained more white area in new created image. This problem didn't occur while i rotate 90,180,270,360. Otherthan that value it affect the image. So can anybody help to solve this issue. |
| |||
| Varghese, If you rotate an already rotated image then, it will rotate along with the white space only. Its not a bug. the functionality is like that. If you want to avoid this problem then you have to rotate the total angle from the original image (provided if you know the total angle to rotate from the original image.).
__________________ None of us is As Strong as All of us. |
| |||
| hi Sabari use the function getimagesize(imagepath) -> Returns an array with 5 elements. Index 0 and 1 contains respectively the width and the height of the image. Note: Some formats may contain no image or may contain multiple images. In these cases, getimagesize() might not be able to properly determine the image size. getimagesize() will return zero for width and height in these cases. Index 2 is one of the IMAGETYPE_XXX constants indicating the type of the image. Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag. Index 4 is mime is the correspondant MIME type of the image |
| |||
| Hi vivekanandan, Imagemagick is much better when compared to GD. Image quality will be better in imagemagick since it uses the same DPI of the original image, also the image creation time is lesser. The only thing is image size will be little bit higher when compared to images created from GD.
__________________ None of us is As Strong as All of us. |
| |||
| Hi Anand, We had implemented to align the text using imagemagick linux command(Background process). It's working fine. Try the following command to align the text in the bottom center of the image. $vFont = "fonts/brushscript_bt.ttf"; $vText = addslashes("Happy New Year 2007"); $vInsertFile ="1mbpic_28.jpg"; exec ("convert $vInsertFile -font '$vFont' -fill '#FFFFFF' -density 70 -pointsize 45 -gravity south -annotate 0 \"$vText\" new_one.jpg"); |
| |||
| Thanks for ur reply senthil kumar, can you explain a bit more on what that function actually does and whats the need of -gravity south and -annotate and the purpose of these parameters in the function.
__________________ None of us is As Strong as All of us. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/php-programming/3146-image-handling-php.html | |||
| Posted By | For | Type | Date |
| Anandkv's bookmarks on del.icio.us | This thread | Refback | 08-21-2007 06:32 AM |
| DiscussWeb IT Community - Fusing | This thread | Refback | 08-06-2007 03:07 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert image to other image format using CODEC in .NET 3.0 | Mramesh | C# Programming | 0 | 02-07-2008 03:33 AM |
| How to create an image from panel background Image | S.Vinothkumar | C# Programming | 1 | 10-22-2007 03:52 AM |
| Error Handling in PHP | sivaramakrishnan | PHP Programming | 13 | 09-21-2007 05:03 AM |
| How can I do error handling in php? | itbarota | PHP Programming | 0 | 09-12-2007 12:39 AM |
| Image Handling in PERL | raj | Perl | 4 | 08-23-2007 12:23 AM |