Skip to content

fix(MediaQuality): don't skip HEIC/HEIF transcode#732

Open
Alpha3288 wants to merge 1 commit into
Dev4Mod:masterfrom
Alpha3288:fix/heic-image-transcode
Open

fix(MediaQuality): don't skip HEIC/HEIF transcode#732
Alpha3288 wants to merge 1 commit into
Dev4Mod:masterfrom
Alpha3288:fix/heic-image-transcode

Conversation

@Alpha3288

Copy link
Copy Markdown

Problem

Sending a HEIC/HEIF image with HD Quality Images enabled produces a corrupt upload - the recipient sees "This image is not available because something is wrong with the image file." Reproduced on WhatsApp 2.26.26.x.

Root cause

feat(MediaQuality): add configuration for improved media quality settings (72624df) sets five image-path A/B-prop booleans. One of them, 26291, enables WhatsApp's Jarvis ML image-transcode config (UitTranscodeConfig / JarvisImageConfig) in ProcessImageTaskConnector:

if (abProps.A0s(z ? 26289 : 26291)) {
    processImageQuality.uitTranscodeConfig = new UitTranscodeConfig(jarvisImageConfig(...));
}

That path's native passthrough decision mishandles HEIC/HEIF: the source is uploaded without being transcoded to JPEG, so recipients can't decode it.

How it was diagnosed

  • On-device bisection (rooted, WA 2.26.26.73): both toggles off -> OK; HD Images only -> broken; HD Video only -> OK.
  • Per-flag: 26289+26291 -> broken; 26289 only -> OK; 26291 only -> broken; all-except-26291 -> OK.
  • Confirmed the consumer with a runtime stack-trace hook on the boolean-prop getter (C00D.A0s(int)), then recovered the ProcessImageTaskConnector coroutine that reads it.
  • 26289 is the same gate for a different image mode (unaffected); 6033/9569/22375 are inert or unrelated.

Fix

Drop only 26291, keeping the maxKb/quality/maxEdge quality knobs and the other props - the HD-image quality boost is preserved while HEIC/HEIF transcodes to JPEG correctly again.

Verified on-device: with the fix and HD Images enabled, HEIC images send and open correctly for the recipient.

The image-quality overrides added in 72624df enable ab-prop 26291, which
turns on WhatsApp's Jarvis ML image-transcode config (UitTranscodeConfig /
JarvisImageConfig) in ProcessImageTaskConnector. That path's native
passthrough decision mishandles HEIC/HEIF: the source is uploaded without
being transcoded to JPEG, so recipients get "something wrong with the image
file". On-device bisection confirmed 26291 as the sole culprit (26289 is the
same gate for a different image mode and is unaffected), so drop only that
flag and keep the maxKb/quality/maxEdge quality knobs and the other props.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant