in reply to Image analysis

UGH!!!

I was cranking along with GD and thinking I was doing pretty well with this and should easily finish the first major chunk of it by the end of the week (maybe even the day if things stay slow at work like they have been so far today).
I have a dir full of images that this will scan over and "learn" on - those images are all jpegs.

I didn't think anything of it and was merrily trying to test my code and I kept getting the error "Usage: newFromJpeg(class,filehandle)" and was getting annoyed trying to figure out what was wrong with the code that I was using.

But alas - after a Google search, it seems that is a common error response that one gets if the GD install doesn't have the jpeg support in there.
Like I said in my first post, I am on a shared pair.com server, and just use the modules that they have installed... so it looks like they haven't installed jpeg support for GD (which makes sense since I think I recall that the php access to GD on the server also can't do jpeg - and I assume that they are likely calling the same C libraries?).

So now I have crunched up against a wall - GD has the method calls that I want/need - but I can't use jpegs.

Off the top of my head, I know that the install of GD that I have can do png files - and I think there is likely an easy way to convert jpegs to png (png even has a 24bit deal I think - even though GD only goes up to 18bit - whatever).
So I will try to add in some code to convert from jpeg to png and then do the scan on the png instead.

If anyone else has any ideas (aside from installing more modules/libraries) - feel free to toss them up.

-------------------------------------------------------------------
There are some odd things afoot now, in the Villa Straylight.