Read and Write Image in Python 3.1 ?
No lib

Thank you so much.

I am sory for my question.

I have image data in buffer I want to save image in my computer by don't use library.
(I use python 3.1)
Thank you so much.

I am sory for my question.

I have image data in buffer I want to save image in my computer by don't use library.
(I use python 3.1)
Thank you so much.

Well, like any other data

with open(filename, "wb") as fileout:
    fileout.write(data)

I think he ment printing image just like printing plain txt files.

No you cant print image like that. Thay can be worked on and as Gribouillis stated. You can read in work on it, then save the image.

Using PIL module or Image module will give you very interesting pic manipulation methods. croping,scalling,alpha,color changing, just like photoshop does.

image data is buffer type can not write this.

without lib..... there is no much you can do with images.

Please post some code. Where does the buffer come from ?

This code use in Blender 2.5 I have link my project.
http://www.mediafire.com/?3226iywggolse53

This project open by program Blender. download program:
http://www.blender.org/download/get-254-beta/
(Blender 2.55 Beta Installer (23 MB))

Install program blender success.
And double click my project.

Go to menu Game-->Start Game Engine.
Use see code python in right hand.

And see error in command window.

Thank you very much for helping.
I appreciate very much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.