Discuss Scratch

Kongu84
Scratcher
100+ posts

How to preserve bitmap definition?

When using bitmap in Scratch, sprites/clones often become blurred, especially when altering the size via costume blocks and when using transparency in the costume itself. (not with the ghost effect) Does anyone know how to fix this so that I can make a good, crisp looking bitmap game?
J-Craft
Scratcher
77 posts

How to preserve bitmap definition?

So, from what I know, as long as it's size can be dived evenly into 100, (like 200 or 1500), it won't look distorted. I'm not sure what you mean by transparency within costumes though.

Hope that helps!
J-Craft
Scratcher
77 posts

How to preserve bitmap definition?

Oh, and if that doesn't make sense, then try this script:

setsizetoroundYOURNUMBERHERE*100%

By editing the “YOUR NUMBER HERE” variable, (or whatever you want to go in that space,) you will have no size distortions.
Kongu84
Scratcher
100+ posts

How to preserve bitmap definition?

J-Craft wrote:

So, from what I know, as long as it's size can be dived evenly into 100, (like 200 or 1500), it won't look distorted. I'm not sure what you mean by transparency within costumes though.

Hope that helps!
Thanks! This is definitely good to know, although we are *way* too far into the project (~500 unique art pieces) to change anything. So do you mean the size displayed beneath the costume name in the editor? And by transparency within sprites, I mean transparent pixels in the costume.
Kongu84
Scratcher
100+ posts

How to preserve bitmap definition?

J-Craft wrote:

Oh, and if that doesn't make sense, then try this script:

setsizetoroundYOURNUMBERHERE*100%

By editing the “YOUR NUMBER HERE” variable, (or whatever you want to go in that space,) you will have no size distortions.
Thanks!
J-Craft
Scratcher
77 posts

How to preserve bitmap definition?

I mean the size in the “looks” block section, and sorry, I don't know about the pixel transparency issues.
Kongu84
Scratcher
100+ posts

How to preserve bitmap definition?

J-Craft wrote:

I mean the size in the “looks” block section, and sorry, I don't know about the pixel transparency issues.
Yeah I know what you mean. I just tried it and it didn't fix the problem. Thanks anyways.
J-Craft
Scratcher
77 posts

How to preserve bitmap definition?

Here, can I take a look at the project and see if I can locate the problem?
footsocktoe
Scratcher
1000+ posts

How to preserve bitmap definition?

Kongu84 wrote:

When using bitmap in Scratch, sprites/clones often become blurred, especially when altering the size via costume blocks and when using transparency in the costume itself. (not with the ghost effect) Does anyone know how to fix this so that I can make a good, crisp looking bitmap game?

It's a paradox that the only way to have a crisp bitmap is to do it in vector. Create the pixels as vector squares. They will remain absolutely crisp and clear no matter how big or small you resize them.

On the other hand, if you resize a bitmap, various smoothing algorithms kick in and add antialias to the edges. If you have worked with paint programs then you know that some of them have alternate methods of resizing just to handle this problem. I use paintshop and it has an option to resize without smoothing.
Kongu84
Scratcher
100+ posts

How to preserve bitmap definition?

footsocktoe wrote:

Kongu84 wrote:

When using bitmap in Scratch, sprites/clones often become blurred, especially when altering the size via costume blocks and when using transparency in the costume itself. (not with the ghost effect) Does anyone know how to fix this so that I can make a good, crisp looking bitmap game?

It's a paradox that the only way to have a crisp bitmap is to do it in vector. Create the pixels as vector squares. They will remain absolutely crisp and clear no matter how big or small you resize them.

On the other hand, if you resize a bitmap, various smoothing algorithms kick in and add antialias to the edges. If you have worked with paint programs then you know that some of them have alternate methods of resizing just to handle this problem. I use paintshop and it has an option to resize without smoothing.
Thanks! This comment was really helpful; I wasn't sure what the problem itself was before. If I convert the bitmap object into vector will it fix this?
footsocktoe
Scratcher
1000+ posts

How to preserve bitmap definition?

Kongu84 wrote:

footsocktoe wrote:

Kongu84 wrote:

When using bitmap in Scratch, sprites/clones often become blurred, especially when altering the size via costume blocks and when using transparency in the costume itself. (not with the ghost effect) Does anyone know how to fix this so that I can make a good, crisp looking bitmap game?

It's a paradox that the only way to have a crisp bitmap is to do it in vector. Create the pixels as vector squares. They will remain absolutely crisp and clear no matter how big or small you resize them.

On the other hand, if you resize a bitmap, various smoothing algorithms kick in and add antialias to the edges. If you have worked with paint programs then you know that some of them have alternate methods of resizing just to handle this problem. I use paintshop and it has an option to resize without smoothing.
Thanks! This comment was really helpful; I wasn't sure what the problem itself was before. If I convert the bitmap object into vector will it fix this?

It's not possible to convert it in Scratch. Adobe Illustrator can do it. It's called Autotrace and should work fairly well for this type of use.

If you put a bitmap in Scratch's vector editor all you are doing is embedding a bitmap in a vector file. Autotrace finds all the edges that are present in the bitmap and converts it to vectors. HOWEVER, they will not be pixels except in the particular case where a pixel is isolated. In other words, three pixels of the same color together will auto trace to one vector shape that looks like a Tetris block.

I don't know how many bitmaps you have, but if it's only one, then put it in the vector editor and use the zoom until you can easily see individual pixels. Now use the rectangle tool to make vector squares to cover each pixel. Essentially, you are performing the auto trace function yourself. When you have all the pixels covered with vector squares, then delete the bitmap image.
Kongu84
Scratcher
100+ posts

How to preserve bitmap definition?

footsocktoe wrote:

Kongu84 wrote:

footsocktoe wrote:

Kongu84 wrote:

When using bitmap in Scratch, sprites/clones often become blurred, especially when altering the size via costume blocks and when using transparency in the costume itself. (not with the ghost effect) Does anyone know how to fix this so that I can make a good, crisp looking bitmap game?

It's a paradox that the only way to have a crisp bitmap is to do it in vector. Create the pixels as vector squares. They will remain absolutely crisp and clear no matter how big or small you resize them.

On the other hand, if you resize a bitmap, various smoothing algorithms kick in and add antialias to the edges. If you have worked with paint programs then you know that some of them have alternate methods of resizing just to handle this problem. I use paintshop and it has an option to resize without smoothing.
Thanks! This comment was really helpful; I wasn't sure what the problem itself was before. If I convert the bitmap object into vector will it fix this?

It's not possible to convert it in Scratch. Adobe Illustrator can do it. It's called Autotrace and should work fairly well for this type of use.

If you put a bitmap in Scratch's vector editor all you are doing is embedding a bitmap in a vector file. Autotrace finds all the edges that are present in the bitmap and converts it to vectors. HOWEVER, they will not be pixels except in the particular case where a pixel is isolated. In other words, three pixels of the same color together will auto trace to one vector shape that looks like a Tetris block.

I don't know how many bitmaps you have, but if it's only one, then put it in the vector editor and use the zoom until you can easily see individual pixels. Now use the rectangle tool to make vector squares to cover each pixel. Essentially, you are performing the auto trace function yourself. When you have all the pixels covered with vector squares, then delete the bitmap image.
I have no intention of changing the appearance to vector, as bitmap is the heart of the game, but if I'm able to preserve both the appearance and the definition, that'd be best. I'll experiment with what you told me. Thanks!
Kongu84
Scratcher
100+ posts

How to preserve bitmap definition?

footsocktoe wrote:

Kongu84 wrote:

footsocktoe wrote:

Kongu84 wrote:

When using bitmap in Scratch, sprites/clones often become blurred, especially when altering the size via costume blocks and when using transparency in the costume itself. (not with the ghost effect) Does anyone know how to fix this so that I can make a good, crisp looking bitmap game?

It's a paradox that the only way to have a crisp bitmap is to do it in vector. Create the pixels as vector squares. They will remain absolutely crisp and clear no matter how big or small you resize them.

On the other hand, if you resize a bitmap, various smoothing algorithms kick in and add antialias to the edges. If you have worked with paint programs then you know that some of them have alternate methods of resizing just to handle this problem. I use paintshop and it has an option to resize without smoothing.
Thanks! This comment was really helpful; I wasn't sure what the problem itself was before. If I convert the bitmap object into vector will it fix this?

It's not possible to convert it in Scratch. Adobe Illustrator can do it. It's called Autotrace and should work fairly well for this type of use.

If you put a bitmap in Scratch's vector editor all you are doing is embedding a bitmap in a vector file. Autotrace finds all the edges that are present in the bitmap and converts it to vectors. HOWEVER, they will not be pixels except in the particular case where a pixel is isolated. In other words, three pixels of the same color together will auto trace to one vector shape that looks like a Tetris block.

I don't know how many bitmaps you have, but if it's only one, then put it in the vector editor and use the zoom until you can easily see individual pixels. Now use the rectangle tool to make vector squares to cover each pixel. Essentially, you are performing the auto trace function yourself. When you have all the pixels covered with vector squares, then delete the bitmap image.
Thank you for the help; I tried this and while the result is not perfect, I am now able to view everything clearly and very crisply-er-est.
Niko_like_Pancake
Scratcher
6 posts

How to preserve bitmap definition?

Kongu84 wrote:

footsocktoe wrote:

Kongu84 wrote:

footsocktoe wrote:

Kongu84 wrote:

When using bitmap in Scratch, sprites/clones often become blurred, especially when altering the size via costume blocks and when using transparency in the costume itself. (not with the ghost effect) Does anyone know how to fix this so that I can make a good, crisp looking bitmap game?

It's a paradox that the only way to have a crisp bitmap is to do it in vector. Create the pixels as vector squares. They will remain absolutely crisp and clear no matter how big or small you resize them.

On the other hand, if you resize a bitmap, various smoothing algorithms kick in and add antialias to the edges. If you have worked with paint programs then you know that some of them have alternate methods of resizing just to handle this problem. I use paintshop and it has an option to resize without smoothing.
Thanks! This comment was really helpful; I wasn't sure what the problem itself was before. If I convert the bitmap object into vector will it fix this?

It's not possible to convert it in Scratch. Adobe Illustrator can do it. It's called Autotrace and should work fairly well for this type of use.

If you put a bitmap in Scratch's vector editor all you are doing is embedding a bitmap in a vector file. Autotrace finds all the edges that are present in the bitmap and converts it to vectors. HOWEVER, they will not be pixels except in the particular case where a pixel is isolated. In other words, three pixels of the same color together will auto trace to one vector shape that looks like a Tetris block.

I don't know how many bitmaps you have, but if it's only one, then put it in the vector editor and use the zoom until you can easily see individual pixels. Now use the rectangle tool to make vector squares to cover each pixel. Essentially, you are performing the auto trace function yourself. When you have all the pixels covered with vector squares, then delete the bitmap image.
Thank you for the help; I tried this and while the result is not perfect, I am now able to view everything clearly and very crisply-er-est.
You also can go to a blank turbowarp project, turn on HD immage uploads in addons, upload your image via that, export it as an svg, and import it into scratch. im posting this for people who see this from google

Last edited by Niko_like_Pancake (April 17, 2024 18:22:01)

bombardingppl
Scratcher
500+ posts

How to preserve bitmap definition?

I think I have the answer. You can't preserve the resolution if the image is already a bitmap when you try to preserve its resolution (example: importing images) But if you're converting vector to bitmap and you want to preserve the resolution, scale the vector drawing up to its max in the inner rectangle (the outer rectangle is the max for vector, but the inner rectangle is the furthest you can go on bitmap.) You can even rotate the image diagonally so you get some additional size. Then convert to bitmap, and then you can convert back to vector, but if you strictly want it in bitmap, you'll have to scale it down using the blocks. The reason why you'd do this in some cases is to remove the number of things which can cause lag, and merging it all into a bitmap image and back makes it only 1 image.

Powered by DjangoBB