This is a discussion on Image handling in php within the PHP Programming forums, part of the Web Development category; Hi Anand, -density Defines the quality of the images that is pixels per inch -pointsize Defines the size of the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi Anand, -density Defines the quality of the images that is pixels per inch -pointsize Defines the size of the text -gravity Defines the position of the text south -> bottom center southeast -> bottom left southwest -> bottom right center -> center north -> top center northeast -> topleft northwest -> topright -annotate Defines the x and y position of the text |
| Sponsored Links |
| |||
| Thanks for your reply, The example you gave is for the commandline tool of imagemagick. But i am using frontend tool. It seems there is no such option in the frontend tool for this functionality. If there is any option please suggest me on achieving this. Thanks,
__________________ None of us is As Strong as All of us. |
| |||
| Hi, We used only the command line tools for the imagemagick. We haven't experimented with the front end imagemagick functions Let me digg deep into this topic and find out with a solution. I hope there will be some way to solve this |
| |||
| Hi, It seems there is no built in function in image magick front end tool to align the texts. [magick-users] Text alignment When googling i found this link. Also, it seems we have to position the texts manually by the calculations.
__________________ None of us is As Strong as All of us. |
| |||
| Hi Anand, As far as text alignment concern in Magick there is one functionality available to do that. That function is called setGravity(). In command line it is working with Magick 6.3 and greater but for front end it is under development and it is not completed yet. I hope the next version of magick release we will get this function soon. But for your current use you can try this line of code. May be it help you somewhat. convert SourceImage.jpg -font verdana.ttf -fill #993366 -pointsize 30 -gravity southwest -annotate +0+5 "Testing Gravity" DestinationImage.jpg These are the main parameter value for gravity. south southwest southeast north northwest northeast I hope as above parameter if we change and try we will able to set the alignment anywhere in image. Thanks
__________________ K K Venkata Charya Success is easy to get but difficult to retain |
| |||
| hi, As like we discussed about Image Magick functionality there is another image functions available called "ImLib". This the latest and most useful one. The real good thing is it is much faster than anyother image library function while we compare this with GD, Magick or Wand. Clarity of the image is also remain same like original one but while compare this with magick, magick contain the same DPI as like the oroginal image while ImLib create the image with 96 DPI. There is lost of image function available in ImLib similar like other image function. Here i introduce the first and start of the any image functionality. int imlib_load_image(string img[, int &err]) Load a file into an image, optionally fetch an error parameter Thanks
__________________ K K Venkata Charya Success is easy to get but difficult to retain |
| |||
| Hi Senthil, To covert any image format as Jpg to Gif in ImLib you can use this function called imlib_image_set_format. void imlib_image_set_format(int img, string format) Sets the image format of an image. Mention image and the desired format in parameter and you can able to create image with desired format. Thanks
__________________ K K Venkata Charya Success is easy to get but difficult to retain |
| |||
| Hi KK I need to covert a set of images(more than one image) to a pdf or zip format. Is any function available in imlib to convert morethan one image to a pdf or zip file format? if available can you provide a sample code? |
| |||
| Hi Senthil, As far as format concern we can change JPG as PDF with same function as i mentioned in my previous thread "imlib_image_set_format" but so far my knowledge we do not have any function like push list in ImLib which is available in Imagick. In Imagick we can do this and those information available in same thread but we do not have pushlist option in ImLib. Thanks
__________________ K K Venkata Charya Success is easy to get but difficult to retain |
| |||
| Hi, Can anybody help me to find out DPI of image PDF. I create some set of images and pushed those in PDF but i can not able to find out the exact DPI of those images. Can anybody tell me how can i find that? |
| |||
| Senthil, In your created PDF if you want to check the DPI of the images then you just have to right click that PDF and open with Photoshop. It will open all the images in photoshop thumbnail and you can choose any of those image and can able to check the height, width and resolution of the image. I hope it help you. |
| |||
| Hi Varghese, Thanks for your quick response. Yes while i open in Photoshop it shows as you said but the problem is while i open in Photoshop it asking me about rasterizing with default height, width and resolution. If i made changes there it is changed. I don't think it provide accurate result. |
| |||
| Hi Senthil, Your are right. While we open that PDF file in Photoshop it ask that raster option which may change image value and we can not able to get the correct result. To solve this problem you have to follow some step. 1. Install PDF Professional version because as per my checking i didn't get saveas option to change any PDF as JPG but it is available in PDF professional. 2. After that install Irfanview image viewer. 3. Save your pdf as JPG in any of your specific folder. It will create JPG of all images which available in your PDF. 4. Open those image in Irfanview. 5. Click "Image information" tool option which available in your toolbar just after zoom in option. It will display complete image information accurately and you can able to find out the exact DPI of the image Thanks
__________________ K K Venkata Charya Success is easy to get but difficult to retain |
| |||
| Hi, We are lot talking about Magick library in this thread but the first and formost used Image Library is GD library. This is first and most useful PHP Image library which used almost everywhere in Image Processing actions. The imagecreate () function is used in PHP to create a new palette based image using the GD Library. It's two parameters are width and then height of the image to be created. imagecreate ( int x_size, int y_size ) PHP Code:
__________________ K K Venkata Charya Success is easy to get but difficult to retain |
| |||
| HI, Here i am discussing about GD Image Function called getimagesize (). This functions is used to get Image Height and Width. getimagesize( string $filename [, array &$imageinfo] ) $vfilename = Image Path to calculate Image Size. This function returns an array with 4 elements. Index 0 contains the width of the image in pixels. Index 1 contains the height. Index 2 is a flag indicating the type of the image: 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order), 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF, 15 = WBMP, 16 = XBM. These values correspond to the IMAGETYPE constants that were added in PHP 4.3.0. Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag. PHP Code: Image Width = 400 Image Height = 500 Image Type = JPEG Thanks
__________________ K K Venkata Charya Success is easy to get but difficult to retain |
![]() |
| 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 |