Blurry Images when Uploading

1 sentence description of the problem: I was trying to upload an image for my game via the Files App, but for some odd reason, it turned out blurry (more blurry than usual, like it was uploaded at half the size and sized back up to 100% again). This is an issue because a lot of projects need their images to be a crisp as possible. At first I thought it was an odd width and height thing, but I soon realized it was much worse…

Steps to reproduce the problem every time, starting in a blank draft:

(If it is an existing project, include the link. And remove all code that is not related to the bug)

  1. Place a set image block
  2. Upload any (sharp) image from files (50 seeds / sub required)
  3. Play the project

I expected this to happen: A sharp, crisp image

But instead this happened: A blurry image

Screenshots/video:
image


Your username: Crosbyman64

Device type, player version & Hopscotch version: iPad13,8 (iPadOS 16.1), 2.1.3 (1.5.23 in screenshot example), Affected Versions: 3.57.0, 3.58.0, 3.59.0, 3.60.0, 3.62.0, 3.63.0, 3.64.0, 3.65.0, 3.66.0
(Or you can include a screenshot of your About page, in :gear: > About)

Image size: 86 x 118 pixels (43 x 59 units on Hopscotch)

8 Likes

Thanks a lot for making the topic — funny coincidence with creating it at the same time.

Just to check, what were the sizes of the images that became blurry?

(Edit: thanks I just saw the sizes)

I just moved it to #hopscotch-bugs:ios since we had some changes to image sizes recently on the iOS app.

6 Likes

The player version of the project I uploaded my image to was 1.5.23, but I can confirm this also happens on the latest player version as well. I can also confirm this happens with full screen images (2372 x 2048 pixels) as well.

3 Likes

I also have this problem,

5 Likes

the burry thing depends on how hopscotch resizes images (none, bicubic, bilinear, etc) and unfortunately a temporary solution is to import the image at 2x the original size

6 Likes

This blurry thing is still a bug because it didn’t occur in the TestFlight version.

4 Likes

I’m sure images are sized using the bilinear method, but to me, it seems that Hopscotch uploaded the image at 50% the intended size (and I don’t mean pixel to unit size), then resizes it back up to 100% size (which might (and I could be wrong) be how the large images showing smaller than intended got fixed… all it really needs is about 99% it’s original size, since images upload at their correct sizes up until the stage size).

3 Likes

This isn’t very practical since larger images can produce lag faster than smaller images.

3 Likes

Just going to tag @MrBlobby since he might have some insights on this bug
(Images are becoming blurry after uploading from the Files app)

4 Likes

Ah thanks for the feedback!

Dealing with various image bugs there were some changes. Now uploading an image is done at a 1x scale consistently. Where previously it would depend on the device (the device’s screen scale, which could be 2x or 3x).

We also didn’t see any issue in Testflight which is interesting…

Something I shall investigate!

7 Likes

Yep the image changes weren’t on the TestFlight version which had the earlier scene changes — they were included on the release in 3.57.0

4 Likes

Yeah, I noticed this too, which was why I used the TestFlight version as a temporary workaround for an image related bug fix in my game. I immediately went back to the public version afterwards.

3 Likes

I think @Yuanyuan tested using the pre-release TestFlight build before submission, not sure if that went to beta testers though.

5 Likes

Probably not. The last beta build I tested was build # 7356

3 Likes

:+1: It’s in the queue for us to investigate.

5 Likes

Oof this is not a good bug at all

4 Likes

A temporary fix for this is to upload images at 2x or 3x, though I definitely think this method is inconvenient and not ideal.

(This was what the app was doing for images, just resizing them at 2x or 3x, before uploading to the server. But this method means that much larger upload files are going to the server every time, bigger than the user uploaded.

It should be the webplayer that handles resizing after getting images from the server, and we’re hoping to work on a fix for this but it might take a bit longer.)

1 Like

I just noticed the “in-development” tag was added. I’m am so glad the fix for this is being worked on.

Once this bug has been resolved, you can use this project to compare the images. I can also share my coin images I used in this project via email, if you want a direct comparison.

2 Likes

If you could share the images via email, that would be really helpful too! You can email help@gethopscotch.com

2 Likes

Ok I just sent an email. I also forwarded and said why I sent a random coin image in the first place.

4 Likes