CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   How useful are php created images? (http://www.codingforums.com/showthread.php?t=283242)

LearningCoder 11-29-2012 05:48 PM

How useful are php created images?
 
Hi, well the title says it all really.

How useful are php created images and are they really necessary to learn? Can anyone give me any examples of when you would use such a thing? I've seen an example where you can ask the user to create an image but if you're not creating that type of website, is it worth learning?

Please let me know your thoughts.

Regards,

LC.

tangoforce 11-29-2012 09:04 PM

Well that depends what you want to do. If you want to setup an online equivalent of photoshop then you've got a lot to learn.

If you just want to create captcha images then you can find a class at white hat web design that'll do the job nicely.

It really depends what you need to know. I've never bothered learning to deal with images in php as I don't need it or ever intend to deal with images. Should the time ever come that I need to overly watermarks etc, I'm sure there will be a class I can use, hack, customise etc.

LearningCoder 11-29-2012 10:09 PM

I just saw an example of images including a captcha and thought it would be a cool little feature to add. It seems it is a whole new area of php though and don't think I'm up to that task just yet. Just wanted some advice on the most common features of PHP images.

Could you explain in laymans terms about the concept of an overlay? Is it the same as when you go on an image site and they print their name/logo onto the front to prevent people from stealing them?

Cheers for the reply.

Regards,

LC.

mlseim 11-29-2012 10:31 PM

You actually create a real .jpg image with some text or pattern embedded on top of the photo.

Anything you display on the internet can be copied. You can only control the quality of the image.
You give users a watermarked, reduced resolution, or crappy quality.
If they copy it, that's what they get.

You may want to create a graphic image for a user that enters text on a form.
Here's sort of a 'sappy' example:
http://www.catpin.com/card_sample/

The idea is to show the rendered image is really an image, not HTML.



.

firepages 11-30-2012 03:50 PM

and lots of other uses.. I use Zend's barcode library to create barcodes which are saved as images for printing labels etc, you can also (generate &) display emails as images to avoid scraping etc, creating thumbnails of user uploaded images, I have a dodgy label printer which I can't get working with the PHP printer draw functions but can get it to print an image so I create the image (serial/job numbers etc) and print that instead.

I am currently working on a valuation system that will show e.g. a picture of a diamond and then (how I have not worked out yet :)) allow the valuer to mark where the inclusions are, then I will combine the 2 images to produce an image for the valuation report.

To be fair I mostly use imagemagick rather than PHP's image functions but either way its useful from time to time.

mlseim 11-30-2012 05:05 PM

imagemagick is way better, but for most shared webhosts, PHP GD is easier to access and use.

Thyrosis 11-30-2012 06:21 PM

Quote:

Originally Posted by mlseim (Post 1296181)
imagemagick is way better, but for most shared webhosts, PHP GD is easier to access and use.

True, mainly because ImageMagick in some form needs the exec() function to work, which is by default disabled on pretty much all shared hosting providers.

mlseim 11-30-2012 10:21 PM

I did discover though, that ImageMagick is available and works great using Perl
instead of PHP (at least available on the few shared webhosts I'm using). Fortunately,
I know Perl so this isn't an issue ... but most people on this section of the forum (PHP)
wouldn't be using Perl.


All times are GMT +1. The time now is 07:40 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.