Re: Problem using IPA package

From: Dmitry Karasik <dmitry_at_karasik.eu.org>
Date: 06 Aug 2006 12:48:49 +0200
To: prima_at_prima.eu.org

        Hi Marijn!

On 05 Aug 06 at 17:37, "Marijn" (Marijn Hofstra) wrote:
 Marijn> /root/spamimages/works/test.png 479 IPA::Point::threshold:
 Marijn> unsupported pixel type at ./imagespamtest.pl line 26.

 Marijn> It is pretty obvious that it does not like the image presented (a
 Marijn> grayscale png image), but I can't seem to find an image that _is_
 Marijn> accepted. I have fed it both .gif and .png files (converted files
 Marijn> and newly created files) to no avail. The image itself seems to be
 Marijn> fine as the width and height can be extracted without problems.

 Marijn> The docs say that the threshold function takes a grayscale image,
 Marijn> which as far as I understand things am giving it. I copied the

Indeed it needs the grayscale image, but it is not necessarily
should be grayscale in the file. Just add

$image-> type( im::Byte);

after the file is loaded
and it will be converted to 256-color monochrome palette 8-bit image.

-- 
Sincerely,
	Dmitry Karasik
Received on Sun 06 Aug 2006 - 12:48:51 CEST

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:06 CET