Bugs item #1510885, was opened at 2006-06-22 21:24
Message generated for change (Comment added) made by joergl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=442886&aid=1510885&group_id=45430

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Josiah Carlson (josiahcarlson)
Assigned to: Nobody/Anonymous (nobody)
Summary: pyx draws bitmaps incorrectly

Initial Comment:
Running the following script should produce a series of
blocks of the 256 shades of grey between and including
black and white.

import pyx
pbb = pyx.bitmap.bitmap
pbi = pyx.bitmap.image
c = pyx.canvas.canvas()
for i in xrange(256):
    c.insert(pbb(.5*(i&15), .5*(i>>4),
pbi(10,10,"L",100*chr(i)), height=.5))
c.writePDFfile('test.pdf')

Instead, it produces either an all-white or all-black
image at random.  This is the case when using Windows
2000, Python 2.3 and 2.4, and is verifiable in both
Adobe Acrobat 7 and Foxit Reader 1.3 .  Adjusting the
above code as necessary for RGB images does not fix the
problem.

The problem exists for the two most recent versions of PyX.

----------------------------------------------------------------------

>Comment By: Jörg Lehmann (joergl)
Date: 2006-06-23 09:36

Message:
Logged In: YES 
user_id=390410

Hello Josiah,

thanks for your bug report. This bug has already been
fixed in SVN (revision 2825). The fix is a one-liner:

Index: pyx/bitmap.py
===================================================================
--- pyx/bitmap.py       (Revision 2824)
+++ pyx/bitmap.py       (Revision 2825)
@@ -259,6 +259,9 @@
                        PSstoreimage=0, PSmaxstrlen=4093,
PSbinexpand=1,
                        compressmode="Flate",
flatecompresslevel=6,
                        dctquality=75, dctoptimize=0,
dctprogression=0):
+        # keep a copy of the image instance to ensure
different id's
+        self.image = image
+
         self.xpos = xpos
         self.ypos = ypos
         self.imagewidth, self.imageheight = image.size

I'm marking this bug as fixed and closing it.

    Jörg

----------------------------------------------------------------------

Comment By: Josiah Carlson (josiahcarlson)
Date: 2006-06-23 01:28

Message:
Logged In: YES 
user_id=341410

A work-around is to create a temporary canvas, insert the
image into the temporary canvas, and insert the temporary
canvas into the main canvas.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=442886&aid=1510885&group_id=45430

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
PyX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel

Reply via email to