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

“HD Image Uploads” is exceedingly slow with modified stage size on Safari #7426

Open
Are-You-a-Person opened this issue May 12, 2024 · 3 comments
Labels
platform: safari Related to Safari platform: turbowarp Related to TurboWarp (Compatibility issues with TurboWarp) scope: addon Related to one or multiple addons scope: performance Related to performance of the extension or an addon type: bug A bug in the addon loader, or in a specific addon

Comments

@Are-You-a-Person
Copy link

Are-You-a-Person commented May 12, 2024

Description

The HD Image Uploads addon takes an exceedingly long time to insert simple, small images (under 2 MB) with modified stage size on TurboWarp.

More information here

Steps to reproduce

  1. Go to https://turbowarp.org/editor?size=2000x1000
  2. Zoom out with the web browser to see the full page
  3. Find pixel art PNG images that are larger than 480x360 pixels with various file sizes (10 KB, 50 KB, 100 KB, 500 KB, 2 MB)
  4. Use the “HD Image Uploads” addon with image sizing set to “Original size” to upload your image individually (so you can see how long processing takes for each) as a costume
  5. Convert the image to an bitmap by pressing the button
  6. Change the project size to normal dimensions (480x360)
  7. Test using a simple moving script (it should still work)
  8. Download the project and upload it to Scratch (optional)

Demonstration(s) and additional context

⭐️ Context and my problem ⭐️

  • I’m trying to make an high-quality territorial.io Scratch port and I need a scrollable stamped background map with zooming features. The maps are pixelated and must be bitmap images; vector images will cause the pixels to blend/smoothen. The sizes of these maps range from 228x228 all the way up to 1754x998. I do not want to use lists nor split maps into multiple image costumes. I decided to use bitmap images to keep the map crystal clear but they only support sizes up to exactly 480x360 on Scratch; remember my maps were up to 2 thousand by 1 thousand pixels in size?

⭐️ How I solved this issue ⭐️

  • Refer to “Steps to reproduce”

⭐️ Another issue with this method ⭐️

  • This method works very well for me and is almost perfect besides one issue. Files with slightly larger sizes take exponentially more time to load into the project. The pixel count of the image doesn’t seem to matter that much though. For example, an 10-30 KB image of any resolution will take a few seconds to put into the project. An 50-100 KB image will take 30 seconds to a minute. An 300 KB image will take over 10 or even 20 minutes. I need to upload 20 images that may be a few hundred KB to just one or two MB. These file sizes are tiny nowadays.

    ⭐️ What I need ⭐️

  • I really want one of the developers (or anyone else with addon knowledge) of HD image uploads addon including @ErrorGamer2000, @GarboMuffin, @World_Languages, and @SheepTester to make uploading 1-2 MB images with pixel sizes from just 228x22 to 1754x998 on a modified stage size take less than 10 minutes each. I saw that the addon is still in beta so this is the perfect time to fix this.

Environment

Browser: Safari
Scratch Addons version: N/A or TurboWarp
Operating system: iPadOS (it’s bad; don’t judge me)

@Are-You-a-Person Are-You-a-Person added status: needs triage Needs triaging by putting relevant labels type: bug A bug in the addon loader, or in a specific addon labels May 12, 2024
@WorldLanguages WorldLanguages changed the title “HD Image Uploads” is exceedingly slow “HD Image Uploads” is exceedingly slow with modified stage size May 12, 2024
@GarboMuffin
Copy link
Member

if this only affects TurboWarp we can move it to https://github.com/TurboWarp/scratch-gui/issues

@Are-You-a-Person
Copy link
Author

if this only affects TurboWarp we can move it to https://github.com/TurboWarp/scratch-gui/issues

Well, yes and no. This problem doesn’t exist in Chrome and Chrome is how you use these addons outside of TurboWarp and directly on the Scratch website. This problem does exist on Safari but the only way to use addons in this browser is to use TurboWarp.

Plus, in this specific case, you can just use regular image uploading and somehow get the exact same image quality meaning this really isn’t that important.

@Are-You-a-Person Are-You-a-Person changed the title “HD Image Uploads” is exceedingly slow with modified stage size “HD Image Uploads” is exceedingly slow with modified stage size on Safari May 12, 2024
@mxmou mxmou added scope: addon Related to one or multiple addons platform: turbowarp Related to TurboWarp (Compatibility issues with TurboWarp) and removed status: needs triage Needs triaging by putting relevant labels labels May 12, 2024
@Samq64 Samq64 added scope: performance Related to performance of the extension or an addon platform: safari Related to Safari labels May 12, 2024
@Are-You-a-Person
Copy link
Author

I kinda figured it out. Maybe mark this as low priority but it’s still definitely a bug. First of all, uploading these images using the “HD Image Uploads” Addon works fine on Chrome but freezes my browser on Safari. Next, since I made my stage size so big, the quality of using regular image uploading is the exact same as HD image uploading but doesn’t freeze the browser. Confusing! I always have the habit of using HD Image Uploads whenever possible so I never tried using normal image uploading until now. Well, even though this is a bug, there’s now an easier solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: safari Related to Safari platform: turbowarp Related to TurboWarp (Compatibility issues with TurboWarp) scope: addon Related to one or multiple addons scope: performance Related to performance of the extension or an addon type: bug A bug in the addon loader, or in a specific addon
Projects
None yet
Development

No branches or pull requests

4 participants