1
$\begingroup$

I am running blender from command line and using some scripts.In order to reduce the output size, I'd like compress the .png output file.I understand that this can be done in Blender GUI. However, I am struggling to find a way of doing it in command line or in script file.

$\endgroup$
2
$\begingroup$
bpy.data.scenes["Scene"].render.image_settings.compression = 15
$\endgroup$
  • 3
    $\begingroup$ Welcome to the site :) Perhaps you could add some detail on how this works and how it can be used from the command line? (also it might be better to use bpy.context, otherwise it won't work if the OP's scene isn't named Scene) $\endgroup$ – gandalf3 Dec 23 '14 at 22:38
  • $\begingroup$ You would have to put this in either a text block, or a .py file, and use the -P command line flag to have Blender run this script before exporting the animation. $\endgroup$ – Skrylar Nov 26 '15 at 13:01
  • $\begingroup$ I embedded Blender in a python script to create a movie out of pictures. Maybe you may want to take a look at the code $\endgroup$ – user1593165 Feb 25 '16 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.