Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitmap Image Import/Upload #1820

Closed
kchadha opened this issue Apr 19, 2018 · 2 comments

Comments

@kchadha
Copy link
Member

commented Apr 19, 2018

Background:

In Scratch 2

There are special bitmapResolution = 2 assets that are generated by:

  1. Converting a vector to a bitmap
  2. Uploading a bitmap that is more than or equal to 2x the size of the stage (resizes so that the larger dimension fits in the stage at double resolution)

In Scratch 3

All assets will be drawn and saved at bitmapResolution = 2
When assets are imported, they will be converted in the way explained below. Then storage will not need to keep track of bitmapResolution anymore in scratch 3.

Proposal for Uploading a Costume in Scratch 3:

With associated metadata (e.g. .sb2, .sb3, .sb, .sprite2, .sprite3)

In this case, use associated metadata (e.g. bitmap resolution to resize the image appropriately)
When a bitmapResolution = 1 image is uploaded, it will immediately be upsized. This should maintain the same look in the scratch 2 and 3 paint editor and project.

Without associated metadata (file upload, camera upload)

  • If any dimension of the image is larger than double the size of the stage, downsize so that the larger dimension fits in the stage at double resolution
  • If any dimension of the image is between (the size of the stage, double the size of the stage], keep the same resolution (as if uploading at bitmapResolution = 2)
  • If all dimensions of the image are smaller than or equal to the stage, double the height and width (scaling by a factor of 4) to keep the same look as when you upload things from scratch 2

The image below, attempts to illustrate these three options:

default

@kchadha

This comment has been minimized.

Copy link
Member Author

commented Apr 19, 2018

@kchadha

This comment has been minimized.

Copy link
Member Author

commented Apr 26, 2018

@kchadha kchadha closed this Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.