Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Re: Warnings when using Graphics::ColorObject

Reply
Thread Tools

Re: Warnings when using Graphics::ColorObject

 
 
Scott Bryce
Guest
Posts: n/a
 
      12-21-2013
On 12/20/2013 2:32 PM, Ben Morrow wrote:
> This looks like a bug in Graphics::ColorObject, but it's hard to be
> sure.


I was thinking the same thing.

> Try adding
>
> use Carp;
> $SIG{__WARN__} = \&Carp::cluck;
>
> to the top of your script, and see if the extra information helps.


Use of uninitialized value within @_ in lc at
C:/Perl/site/lib/Graphics/ColorObject.pm line 1905.
at C:/Perl/site/lib/Graphics/ColorObject.pm line 1905.
Graphics::ColorObject::namecolor(undef) called at
C:/Perl/site/lib/Graphics/ColorObject.pm line 150
Graphics::ColorObject::new('Graphics::ColorObject' ) called at
C:/Perl/site/lib/Graphics/ColorObject.pm line 197
Graphics::ColorObject::new_RGB('Graphics::ColorObj ect',
'ARRAY(0x1e83e2c)') called at C:/Perl/site/lib/Graphics/ColorObject.pm
line 279
Graphics::ColorObject::new_HSV('Graphics::ColorObj ect',
'ARRAY(0x72a71c)') called at G:\Scratch\killme.pl line 12

> PDF supports RGB, and the conversion from HSV to RGB is simple and
> exact (depending on exactly which definition of HSV you want), so you
> might want to consider using RGB colours instead.


I get the same warnings when I convert to RGB. I don't need an exact
conversion. I like to use CMYK when the output is intended to be
printed. But if I don't need an exact conversion, RGB would probably be
just as good a CMYK.


 
Reply With Quote
 
 
 
 
Scott Bryce
Guest
Posts: n/a
 
      12-22-2013
On 12/21/2013 2:06 PM, Ben Morrow wrote:
> Since you said 'pie charts' I'm assuming you're targeting a desktop
> printer rather than (say) an imagesetter.


Yes. I create PDF files that are intended for classroom use. Most of
them are grayscale, but I like to have the option of color sometimes.

> In that case IME you usually get better results with RGB, especially
> in the absence of proper colour management.


This is something I was not aware of.

> Mostly this is because RGB has a larger gamut than CMYK,


That I suspected.

> Alternatively, you could just copy out the algorithm you want (or,
> indeed, just get it off Wikipedia).


I found a Javascript version of an HSV to RBG script on line, which I
re-wrote in Perl. Given your advice, I will use RBG in the PDF file.

It looks like the problem is solved, or, at least, an alternative
without the problem has been found. Thank you for your help!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When did the bool type make it into the language? Christopher Pisz C++ 13 05-05-2013 03:34 PM
"python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com Python 13 05-02-2013 12:50 PM
Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com Python 14 04-30-2013 12:31 PM
Warning in python file when i m using pychecker. Avnesh Shakya Python 2 04-26-2013 06:57 AM
when I read gzipped response from web-servers, GzipReader returnssometimes 'invalid compressed data -- crc error' henry.jykim@gmail.com Ruby 0 04-08-2013 03:51 PM



Advertisments