0

so I wrote an add-on for blender where it sends an email when the render is done and attaches a png of the render. However, the maximum size limit for attachments when sending the email is 10 mb. When I save a 4k render as a png even with 100% compression it still is 17 mb, well above the limit. I want the 4k render, so I can save it on my computer as 4k, but is there some way of either lowering the resolution when saving it using the python script (to 1080p for example) or to lower the resolution before sending it through an email. I've thought of using pil but one that is pretty heavyweight, and two, I can't seem to figure out how to add it to the blender python. What other possible solutions are there?

  • Render a second time but decrease the resolution percentage? – lemon Oct 25 '20 at 07:38
  • Use a file output node, and set the format to jp2k, so that you have much smaller file. – no-can-do Oct 25 '20 at 08:19
  • Read also: https://blender.stackexchange.com/questions/148231/what-image-format-encodes-the-fastest-or-at-least-faster-png-is-too-slow – no-can-do Oct 25 '20 at 08:27
  • https://blender.stackexchange.com/questions/3237/generate-multiple-renders-of-same-scene-each-at-a-different-resolution – no-can-do Oct 25 '20 at 08:30
  • I ended up just using pil because jp2k isn't supported that well comparatively to png and jpeg and pil is blazingly fast compared to rendering a second time, especially on slower hardware. I was able to reduce the file size of a 4k image to less than a mb in just 3-4 seconds with pretty decent quality, so I think that's probably the best solution. – Bob Stone Oct 25 '20 at 17:33

0 Answers0