goboscript icon indicating copy to clipboard operation
goboscript copied to clipboard

Use `bitmapResolution` 2 and scale bitmap images by 2x

Open Bituvo opened this issue 1 year ago • 1 comments

By default, it seems that costumes are written with their bitmapResolution automatically set to 2, which shows costumes as half of their size. This behavior should be toggleable by setting bitmapResolution to 1, which ScratchGen does. Relevant function: https://github.com/aspizu/goboscript/blob/be60affaf6f33c58f57551c614a5163516d3c3fc/src/codegen/sb3.rs#L764-L771

Bituvo avatar Jan 11 '25 16:01 Bituvo

it looks like if you set it to 1 itll get converted to 2 at load time so may as well skip that and have it as 2 from the start

  • GarboMuffin

bitmapResolution should be set to 2, but that requires us to scale bitmap images by 2x, quadrupling it's resolution. If bitmapResolution is set to 1 (which is the case right now after my fix), Scratch will scale the image 2x when the project starts up. Let me know if this you want to avoid this from happening.

aspizu avatar Jan 14 '25 03:01 aspizu