gallery icon indicating copy to clipboard operation
gallery copied to clipboard

Assets generally oversized

Open dnfield opened this issue 5 years ago • 3 comments

See some context at https://github.com/flutter/flutter/pull/61209

Turning on that setting (I in the terminal - not available through IDEs yet), you can see that most images will get inverted/flipped.

I haven't extensively probed this, but at this point I suspect the following:

  • All scaled images (i.e. images on the 1x 2x 3x 4x directories) are actually scaled too large by as much as a factor of 3.
  • All unscaled images are also too large.

It would be best to scale down the assets themselves, to avoid extra binary size/wire transfer. It would be acceptable to provide cache parameters for the images, particularly if we have to decode them at different sizes for different modes (e.g. desktop vs. mobile) and want to just ship the (perhaps slightly over-sized) version to all platforms.

I can try to take a stab at this, but would want to make sure I'm covering the expected modalities. Ideally, any widget that displays an image would be covered by a test (does not have to be a golden test, but does have to actually resolve the image and try to paint it) that paints it at its expected size(s) to verify that the image is adequately sized.

dnfield avatar Jul 22 '20 23:07 dnfield

/cc @willlarche fyi

dnfield avatar Jul 22 '20 23:07 dnfield

Hey Dan, was this on a mobile or desktop device. IIRC, most assets were designed to look nice on desktop, leading them to be oversized on mobile

guidezpl avatar Dec 09 '21 08:12 guidezpl

I believe I ran this on Desktop, but it's been a little while.

dnfield avatar Dec 09 '21 17:12 dnfield