Bugs: Browse | Submit New | Admin

[#2956] gd2-1.0/lib/gd2/image.rb:242: warning: instance variable @palette not initialized

Date:
2005-12-06 22:17
Priority:
3
Submitted By:
Uwe Kubosch (donv)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
gd2-1.0/lib/gd2/image.rb:242: warning: instance variable @palette not initialized

Detailed description
Ruby/GD2 is excellent.  Thank you!

When running this code snippet:

      image = Image.import("original.jpg")
      newHeight=480
      newWidth =newHeight*image.aspect
      image.resize! newWidth, newHeight
      image.export("resized.jpg")

I get the following warning:

/usr/lib/ruby/gems/1.8/gems/gd2-1.0/lib/gd2/image.rb:242: warning: instance variable @palette not initialized

Messes up my logs :)

Add A Comment: Notepad

Please login


Followup

Message
Date: 2006-03-04 04:45
Sender: Rob Leslie

The warning about @palette not initialized is harmless. I'm not
sure what the ambiguous first argument warnings are about?
Date: 2006-01-03 19:44
Sender: Uwe Kubosch

Anybody looking at this?  Should I be worried that the code
gives off warnings?  Is it robust?

Happy new year!

donV
Date: 2005-12-06 22:28
Sender: Uwe Kubosch

More warnings appear for the same code snippet:

/usr/lib/ruby/gems/1.8/gems/gd2-1.0/lib/gd2/image.rb:156:
warning: ambiguous first argument; put parentheses or even
spaces
/usr/lib/ruby/gems/1.8/gems/gd2-1.0/lib/gd2/image.rb:442:
warning: ambiguous first argument; put parentheses or even
spaces

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item