[Image-SIG] c code to python using gd

Jim Tittsler jwt at onjapan.net
Mon Apr 11 10:07:06 CEST 2005

On Mar 18, 2005, at 11:32, Necati DEMiR wrote:
[Your message seems to have gotten stuck in the python.org mailing 
lists for rather a long time... probably because the attachments made 
the message so huge.  You would have been better served by putting the 
images on the web somewhere and given URLs to them.]

> i converted a c code to python. two of them uses gd, but they dont have
> the sama output :(

But they aren't the same code.  Your values of p1 and p2 are quite 
>     int p1 = (255/3);
>     int p2 = 2 * (255/3);
> p1 = 255+1 / 3
> p2 = 2 * (255+1 / 3)

If you use the same values for p1 and p2 in both C and Python, the 
images will be the same.

Jim Tittsler, Mitaka, Tokyo, JAPAN             http://www.OnJapan.net/
Python Starship           http://Starship.Python.net/
Ringo MUG Tokyo           http://www.ringo.net/rss.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2091 bytes
Desc: not available
Url : http://mail.python.org/pipermail/image-sig/attachments/20050411/4d94dbce/smime.bin

More information about the Image-SIG mailing list