Image.save() more heavy than original when using bpy #102421
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#102421
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Linux Mint
Graphics card: Nvidia
Blender Version
Broken: after
29a3f43da5
Worked: Before
29a3f43da5
Short description of error
When copying an image with bpy, the newly created is much more heavy than the original
Exact steps for others to reproduce the error
Some notes:
4b3315fc98
to get my bisect works in some iteration.image_size_issue.blend
Added subscriber: @JulienDuroure
Added subscribers: @brecht, @OmarEmaraDev
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
I can reproduce, though tagging the module for more information before confirming.
Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Previously the image save operator would default to JPEG quality 90, and the Python API would use 75. Now that we made them consistent, it's quality 90 for both, leading to bigger file sizes.
That in itself I would not consider a bug, but the issue is that there is currently no API to control the quality.
I see the glTF add-on already has some code to copy and scale the image datablock, which I think preserves file format settings like quality. But I guess for this case it's packing multiple images into channels of one image, so there is not a single image to copy the file format settings from?
Exactly.
I made a simple script for this bug report, but for glTF cases, we sometimes need to create images from scratch, packing channels from multiple image source to a single image.
This issue was referenced by
377da3f949
This issue was referenced by
981245fc6f
This issue was referenced by
5f4afecbf3
Actually turns out the main problem is that it's saving as PNG despite being set to JPEG. I will fix that, and also add an optional
quality
parameter to theImage.save()
for more control over that.Changed status from 'Confirmed' to: 'Resolved'
Thanks Brecht!