3

When using Fresco Debug Overlay its showing a red overlay when the image is smaller than the view.

Since Fresco doesnt perform upscaling, and it relies on the ashmem, how should I fix this?

Lets say that: I have a view that fits the whole width of the phone My image will always be 500x500.

I use centerCrop for scaling so the image will be upscaled until the width or height matches the view.

Still, the overlay shows red, what should I change or do to make it be green? (I wont nor can make the view smaller, it has to fit the screen width. I cant upscale on my own the image because its in the ashmem. Resizing is useless since it does not upscale.)

1 Answers1

1

The debug overlay is more a guidance to show if images are sized appropriately for the given view. In your case, they don't seem to be since they are too small. That said, having images that are too small could result in a bad visual quality - which you might not be happy with. If the quality is OK for your use case, you can just ignore the red overlay. If the quality is not OK, you have to serve bigger images or images with a higher quality to the client (if possible). Manual client-side upscaling should not be required.

Alexander Oprisnik
  • 1,212
  • 9
  • 9