element-hq / element-hq/element-ios

Resized images are actually 9x the specified resolution

Open
#1,861 1 comment 1 reaction 0 assignees View on GitHub
P2 T-Defect
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

Small is actually 1536x1152, medium is 2304x1728, and large is 3072x2304.

The file sizes are also wrong. For the image I tested, large was 2MB, which seems close enough to the estimate given the incorrect resolution, but small was 641KB, which is 16x.

I tested with an iPhone 8 Plus, and the images were originally HEIF before Riot converted them to JPEG. I'm currently using version 0.6.15 on iOS 11.3, but the issue was present in earlier versions on iOS 11.1.

![resize](https://user-images.githubusercontent.com/1818162/39637765-fe7ec6f0-4f91-11e8-907e-6ae54c9b754f.png)

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is named. Reproduce the resize flow on iOS with an iPhone 8 Plus and HEIF input, then trace the JPEG conversion and size-selection path; done means small, medium, and large images match their specified resolutions and the resulting file sizes are no longer inflated.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.