New issue
Advanced search Search tips

Issue 869320 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Feature



Sign in to add a comment

Chrome is unable to display a valid 12bit jpeg image

Reported by world.best.hacker.h403@gmail.com, Jul 31

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36

Steps to reproduce the problem:
1. Try to open a 12bit jpeg image in Chrome

What is the expected behavior?
The image should be displayed properly.

What went wrong?
Nothing is displayed (except the invalid image icon).

Did this work before? No 

Chrome version: 67.0.3396.87  Channel: stable
OS Version: 6.3
Flash Version: /
 
sample-12bit-image.jpg
3.7 KB View Download
ffmpeg-parses-it-successfully.bat
54 bytes View Download
12bit-jpeg-editor.zip
10.2 MB Download
I can't open it in ImageMagick, Photoshop, Firefox, Internet Explorer, XnView, IrfanView.
There are lots of obscure and rare image formats that Chrome doesn't support.
Labels: Needs-Triage-M67
Re C#1:

There are many medical imaging, traffic and camera applications that create and process 12-bit JPEG images both grayscale and color. 12-bit JPEG format is included in Extended part of the JPEG specification. Libjpeg codec supports 12-bit JPEG and there even exists a high performance version. FastVideo provides GPU-accelerated 12-bit JPEG encoding.


Programs which support 12-bit JPEG images (longer list than the list from comment C#1):

- FastVideo
- NewView
- FFmpeg
- LibJpeg
- TurboJpeg
- CUDA GPU Image Processing SDK
- NodeCanvas


Below are some real world applications which do need 12-bit jpg codec:

- RAW image and video processing
- Digital Cinema
- HDR (WDR) imaging
- Medical imaging with DICOM (MRI, CT, X-Ray, ultrasound, endoscopy, microscopes, etc.)
- Augmented Reality and Virtual Reality
- 3D Video
- 3D Reconstruction
- Astronomy
- Aerial imaging
- Geospatial software
- Display projection systems
- Traffic systems
- Surveillance systems
- High speed cameras
- Machine vision and industrial cameras with high bit depth (12 bits or more)
Components: -UI Internals>Images>Codecs Internals>Compositing>Images
Status: Untriaged (was: Unconfirmed)
Chromium uses libjpeg-turbo (and I think it can optionally use libjpeg). Although the library supports 12-bit jpgs (as does libjpeg), it's a build time flag [1-([2]). So in order to support both, we'd need to build two versions of the library (names mangled differently etc).

Then we'd need to manually parse the SOFx chunk to determine which library to use.

[1] https://cs.chromium.org/chromium/src/third_party/libjpeg_turbo/jconfig.h?type=cs&q=BITS_IN_JSAMPLE&g=0&l=25
[2] https://cs.chromium.org/chromium/src/third_party/libjpeg/jmorecfg.h?sq=package:chromium&q=BITS_IN_JSAMPLE+file:%5Esrc/third_party/libjpeg/+package:%5Echromium$&g=0&l=30
Cc: vmi...@chromium.org enne@chromium.org
Labels: -Type-Bug Type-Feature
Status: Available (was: Untriaged)

Sign in to add a comment