I want to upload an image in PHP and after uploading I need to provide the facility to slice it and give each slice a link (As MAP tag in HTML) to a different page. If anyone know a library or a class that I can use to do so please post a reply. Thanks a lot in advance.
The GD library will work just fine for you.
As an alternative, ImageMagick is also available.
Related
Is this possible? Because as what I have researched, most are using converters. How can I convert images to PDF using only PHP (Yii 2.0 framework, specifically) without the help of any converter software?
In my web application, user is to fill up a form and attach an image. I would like to convert that attached image to a PDF file.
Anyone might be of help? Thanks in advance.
Edit: I am not sure if a source code is needed here. So if you need it, just let me know.
I'm wondering if there are any existing (ideally well documented) PHP or Javascript/jQuery libraries/plugins or tutorials for creating an image from a page. An example of this in existance is Zurb's BounceApp.
This probably isn't something that's oft used, however I'd love to incorporate this into a personal project of mine.
In my particular use case, I would have the CSS and HTML which would dictate the "image" available locally, so there would be no need to get the HTML mark-up of another page, then find it's CSS styles.
Any advice or pointers towards a helpful tutorial or plugin/extension would be very, very, very appreciated :).
You should check html2canvas, it the newest solution for your needs.
You should check this implementation: http://hertzen.com/experiments/jsfeedback/
To crop the image, you can use JCrop and send the info to a PHP script, to resize / crop the image the way you want.
Hope that helps!
I am grabbing links to images and need to convert them on the fly to 72x108 to display on a website. The source images come from various resolutions, so cropping is required.
I know a moderate level of PHP so I can probably make something work for my needs, but was hoping for something that could be called by a url request. EG: mysite.com/thumbnail.php?src=http://anothersite.com/image.jpg&w=72&h=108
That would be ideal, it needs to support jpg/png.
Thanks in advance!
Here is a really handy script for processing and uploading images that's been a top google result for forever. I used it years ago and it was really easy to implement. Looks like it was just updated a couple weeks ago too :)
http://www.verot.net/php_class_upload.htm
This may be overkill, but if you check out the examples you can see there's a lot you can do with it. If you don't use it for this project, it might be worthwhile to try out for the next one.
just read the image from the url with file_get_contents or using curl and use the php gd library to resize and crop the image as per your needs.
Go through the following links for more info:
http://php.net/manual/en/function.file-get-contents.php
http://php.net/manual/en/book.image.php
http://davidwalsh.name/download-urls-content-php-curl
Thanks for looking at this question.
I wanted to know how can I use the GD function imagefill() to patch an image with another image.
imagefill() currently accepts resource of a color.
I can do that. But wanted to know how this can be done with a file.
I noticed a user note - But that didn't worked and took a long time for completion :-( http://www.php.net/manual/en/function.imagefill.php#84288
Okay people, have figures it out...
One needs to use imagecopymerge() function to achieve what i was trying to.
Thanks to all the viewers!
i work in lamp environment .
i search script that know to take a image , that user upload to my site.
and make from this image , new image that contain the real image with small stamp on the top corner.
thanks
your best bet would be to look here it is an ideal script provided by the PHP.net user guide. Just make sure that you have the GD library installed
You'd want a watermark which can be accomplished with GD
What you are describing is "watermarking". There are tools out there to do this, a lot of image manipulation packages have this feature.
A search for this might lead you to something useful.
Have a look at these PHP tutorials:
Using imagecopymerge() to create a translucent watermark
Adding watermarks to images using alpha channels