Page 1 of 2

What features would you like included in an image manipulati

Posted: Wed Jun 07, 2006 4:17 am
by bokehman
What features would you like to see included in an image manipulation class?
  • resizing
  • cropping
  • text and image based watermarks
  • grayscale
  • unsharpmask
  • maintained transparency and alpha channel


What else would you like to see included?

Posted: Wed Jun 07, 2006 5:05 am
by onion2k
Depends on what the aim of the class was. If it was a "tool box" class I'd want everything you suggest there, plus flipping, convolution, channels, colour manipulation (hue replace, saturation, gamma), a few effects (paint, twirl, etc), a few basic drawing tools (text, polygons).. lots of stuff.

But I'm not exactly your average PHP GD user.

Posted: Wed Jun 07, 2006 5:48 am
by bokehman
onion2k wrote:convolution
I'm not that hot on the terminology. Isn't that just like unshark mask? Or is it something very different.

Flipping would be no problem. I'm thinking of adding cloning and edge detection.

Re: What features would you like included in an image manipu

Posted: Wed Jun 07, 2006 5:53 am
by aerodromoi
bokehman wrote:What features would you like to see included in an image manipulation class?
  • resizing
  • cropping
  • text and image based watermarks
  • grayscale
  • unsharpmask
  • maintained transparency and alpha channel


What else would you like to see included?
Something for the gallery: shadows ;)

aerodromoi

Posted: Wed Jun 07, 2006 6:11 am
by onion2k
bokehman wrote:
onion2k wrote:convolution
I'm not that hot on the terminology. Isn't that just like unshark mask? Or is it something very different.
http://mathworld.wolfram.com/Convolution.html

:)

It's a process whereby you multiply each pixel in the image by a factor of it's bordering pixels.. http://docs.gimp.org/en/plug-in-convmatrix.html explains it fairly well. You can do things like blurring, embossing, and edge detection with it. Check phpgd.com for a couple of examples, one with a 1D filter, and one with a 2D filter.

Re: What features would you like included in an image manipu

Posted: Wed Jun 07, 2006 6:12 am
by onion2k

Re: What features would you like included in an image manipu

Posted: Wed Jun 07, 2006 6:31 am
by aerodromoi
onion2k wrote:
aerodromoi wrote:Something for the gallery: shadows ;)
http://www.phpgd.com/scripts.php?script=24
http://www.phpgd.com/scripts.php?script=26
Right now I'm happy with my own resize and crop function, but looking beyond my nose won't hurt me ;)

Thnx,
aerodromoi

Posted: Wed Jun 07, 2006 6:35 am
by Li0rE
I dont really know what to suggest, except that you shouldnt use imagecopyresized, use imagecopyresampled.

Posted: Wed Jun 07, 2006 7:19 am
by MrPotatoes
on the fly PHP Image Manipulation takes it's toll and it's fast whatsoever. i say for the most part do all of that in GIMP/Photoshop.

on my actual websites i never do on the fly image amnipulation. resize, watermark whatever. doesn't matter. i do batch jobs, hand jobs (*giggle*) or whatever in order to get it done on my system. i don't want to waste bandwidth resizing tens or more pictures at once.

but that's just my opinon

Posted: Wed Jun 07, 2006 7:45 am
by aerodromoi
MrPotatoes wrote:on the fly PHP Image Manipulation takes it's toll and it's fast whatsoever. i say for the most part do all of that in GIMP/Photoshop.

on my actual websites i never do on the fly image amnipulation. resize, watermark whatever. doesn't matter. i do batch jobs, hand jobs (*giggle*) or whatever in order to get it done on my system. i don't want to waste bandwidth resizing tens or more pictures at once.

but that's just my opinon
You've got a point there. Adding watermarks and image manipulation is imho better left to dedicated software.
However, when it comes to thumbnailing images, the GD library comes in handy. You don't have to do it on the fly, though.

Anyway, it's not the bandwidth that matters in this case - it's the cpu usage.

aerodromoi

Posted: Wed Jun 07, 2006 8:21 am
by onion2k
MrPotatoes wrote:on the fly PHP Image Manipulation takes it's toll and it's fast whatsoever. i say for the most part do all of that in GIMP/Photoshop.
Two completely seperate areas of web development there. Noone would suggest using GD in place of Photoshop* to design your website's graphics. On the other hand though, Photoshop is useless if you want to thubnail/watermark images uploaded by users.

* Except me. I've written a PHP graphics package thing. For a laugh.

Posted: Wed Jun 07, 2006 8:48 am
by MrPotatoes
onion2k wrote:
MrPotatoes wrote:on the fly PHP Image Manipulation takes it's toll and it's fast whatsoever. i say for the most part do all of that in GIMP/Photoshop.
Two completely seperate areas of web development there. Noone would suggest using GD in place of Photoshop* to design your website's graphics. On the other hand though, Photoshop is useless if you want to thubnail/watermark images uploaded by users.

* Except me. I've written a PHP graphics package thing. For a laugh.
that my friend is a good point. i didn't think of that. if it's from users definatly. i usually see my systems from the admin side and users are a second thought. not as in i don't care because i do. but because i should control the system. so that's where i come from. otherwise you are right.

it's just that image manipulation is soooooooo slow on the PHP side.

Posted: Wed Jun 07, 2006 1:14 pm
by onion2k
MrPotatoes wrote:it's just that image manipulation is soooooooo slow on the PHP side.
Normal stuff like thumbnails and watermarking is fast enough to be indistinguishable from downloading a static image. And with cache'ing you only do the image manipulation once anyway. So speed isn't really an issue.

It's possible to make things that go a lot slower.. http://www.phpgd.com/temp/fire_ordered.jpg was made by my PHP hue replacement code, and took about 20 minutes to run.. That's the sort of thing I find fun though.

Posted: Wed Jun 07, 2006 7:05 pm
by alex.barylski
MrPotatoes wrote:on the fly PHP Image Manipulation takes it's toll and it's fast whatsoever. i say for the most part do all of that in GIMP/Photoshop.

on my actual websites i never do on the fly image amnipulation. resize, watermark whatever. doesn't matter. i do batch jobs, hand jobs (*giggle*) or whatever in order to get it done on my system. i don't want to waste bandwidth resizing tens or more pictures at once.

but that's just my opinon
2 comments...

1) I'm willing to bet that GD is as fast as GIMP so the slight overhead in PHP bindings is all that you pay for...you could cache results on the server for the same effect as using GIMP, Photoshop, etc...

2) It's not bandwidth you are using it's CPU cycles or possibly a dedicated chip intended for rendering graphics

Cheers :)

Posted: Wed Jun 07, 2006 7:28 pm
by nathanr
I still want circular images, not a circle in a square, a proper vector like circle image which text can wrap around, please. Oh and a clipping path filter that knows what you want to cut out and does it just right.

thankyou please