[Bf-python] Saving image data

Campbell Barton ideasman42 at gmail.com
Tue Aug 5 20:27:37 CEST 2014


Checked and it works here, probably the image you're saving isnt a
jpeg, thats because `save_render` uses scene settings, ignoring the
one in the filename.

See this answer for details on setting the image format.
http://blender.stackexchange.com/a/6867/55

On Mon, Aug 4, 2014 at 3:37 AM, karamike <karamike at gmx.net> wrote:
> Hi,
>
> I was trying to use the script render_auto_save.py under 2.7.1, but it
> only produces invalid files.
>
> After rendering a file, I tried to program the main steps of that script
> in the Blenders text editor:
>
> import bpy
> image = bpy.data.images['Render Result']
> print(image.has_data)
> print(image.render_slot)
> print(image.source)
> image.save_render('/tmp/test.jpg')
>
> I've added the print commands to see if there is anything at all.
>
> The output:
>
> True
> 0
> VIEWER
>
> The saved image however is again a very short invalid file.
>
> Do I miss something or is this a bug.
>
>  Michael
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python



-- 
- Campbell



More information about the Bf-python mailing list