Skip to content

image/jpeg: support for yuvj444p jpeg images #29512

@AshKash

Description

@AshKash

What version of Go are you using (go version)?

go version go1.11.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/xxx/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/xxx/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.2/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/vh/n9x4w_4d19j638bvjrl85tvm0000gn/T/go-build328625839=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ curl -o x.jpg https://stat.ameba.jp/user_images/20130130/12/k15911/4c/c4/p/o0800064012397991799.png

$ file x.jpg

x.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, progressive, precision 8, 800x640, frames 3

$ ffmpeg -i x.jpg
Input #0, image2, from 'x.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 36507 kb/s
Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 800x640 [SAR 1:1 DAR 5:4], 25 tbr, 25 tbn, 25 tbc

image.DecodefConfig() and image.Decode() both throw an error for this file (did import _ image/jpeg).

Does the jpeg decoder support this pixel format? Note: the originating website has named the file as .png but it is a jpg file, so ignore that for now.

Another url with similar error: https://www.ikea.com/es/es/images/products/malm-estruc-cama-2-caj-blanco__0559854_pe662044_s4.jpg

The all open fine in the browser and other tools like ffmpeg and imagemagick.

What did you expect to see?

Expect Go to support these file like other normal image processing tools.

What did you see instead?

error decoding: image: unknown format

x

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions