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.

In reply to Re: Image analysis by AssFace
in thread Image analysis by AssFace

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.