Commit Graph

13 Commits

Author SHA1 Message Date
Alexander Weinhold
c2f707aba7 change paths 2018-12-06 17:03:52 +01:00
Nigel Tao
9b1e201e7c bmp: update comment about decoding 32 bpp images
Change-Id: I90f6d36d5257c31dc2e41943e5a1eaa7755da6d2
Reviewed-on: https://go-review.googlesource.com/c/144317
Reviewed-by: David Symonds <dsymonds@golang.org>
Run-TryBot: David Symonds <dsymonds@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-10-23 23:21:08 +00:00
David Heuschmann
a9455cf03d image/bmp: support v4 and v5 info header versions
Decode BITMAPV4INFOHEADER and BITMAPV5INFOHEADER in addition to
BITMAPINFOHEADER and check if any of their features are used. If this is
not the case, the bmp can be decoded as if it had the BITMAPINFOHEADER.
Otherwise an ErrUnsupported is returned.

The colormap.bmp and yellow_rose-small-v5.bmp files were generated using
imagemagick using the following conversions:

convert video-001.bmp -depth 8 -palette colormap.bmp
convert yellow_rose-small.bmp -format BMP5 yellow_rose-small-v5.bmp

The corresponding png files were created using imagemagick convert
without any arguments.

Fixes golang/go#27767

Change-Id: I5c0138b231c68132d39a29c71b61faa546921511
Reviewed-on: https://go-review.googlesource.com/c/141799
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-10-23 22:58:01 +00:00
Nigel Tao
c73c2afc3b bmp: remove unused testing.T arg
Change-Id: I53954db3e83d3a5bb155fec24c7da0dc31b8ea2d
Reviewed-on: https://go-review.googlesource.com/122418
Reviewed-by: David Symonds <dsymonds@golang.org>
2018-07-08 00:43:52 +00:00
Derek Buitenhuis
e7c2a4f042 bmp: Add support for writing bitmaps with alpha channels
This also fixes the writer test to actually compare the decoded images,
so as to make sure it is decoded properly.

Implements golang/go#25945.

Change-Id: I606887baa11b7664018313cf7d5800b2dc7622cf
Reviewed-on: https://go-review.googlesource.com/120095
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-07-06 05:04:57 +00:00
Nigel Tao
f28211f6e1 bmp: optimize decoding and encoding 0xH sized images.
It should be quick regardless of how large H is.

Fixes golang/go#10746

Change-Id: Icde36047e88d9786e64f44724b7ba8b38db2a33f
Reviewed-on: https://go-review.googlesource.com/9836
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-05-11 00:10:33 +00:00
David Symonds
0351284b2d image: add import comments.
Change-Id: I2d3a1d002ad43af24cd8b451a2cae4c217482675
Reviewed-on: https://go-review.googlesource.com/1237
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-09 22:43:18 +00:00
Nigel Tao
8d4fc1653b go.image/bmp: add a test image for top-down BMPs.
LGTM=ruiu
R=ruiu
CC=bsiegert, golang-codereviews
https://golang.org/cl/149090043
2014-10-01 09:41:12 +10:00
Nigel Tao
3bcf25db01 go.image/bmp: support decoding 32-bit BMPs, as well as top-down BMPs.
Tested manually, from "dwebp -bmp" output. dwebp comes from
https://developers.google.com/speed/webp/download

LGTM=bsiegert
R=bsiegert
CC=golang-codereviews
https://golang.org/cl/148020043
2014-09-26 11:11:55 +10:00
ChaiShushan
864256f267 go.image/bmp: add Encode
R=nigeltao
CC=golang-dev
https://golang.org/cl/13407045
2013-09-10 17:19:36 +10:00
Benny Siegert
27e7e9451c go.image/bmp: fix warnings from go vet
reader.go:138:10: image.Config struct literal uses untagged fields
reader.go:144:10: image.Config struct literal uses untagged fields

R=nigeltao
CC=golang-dev
https://golang.org/cl/5825047
2012-03-15 09:44:37 +11:00
Nigel Tao
996c335c4a go.image/{bmp,tiff}: move tiff/testdata to testdata.
Add a "compare to golden PNG" test for BMP and TIFF.

R=rsc
CC=golang-dev
https://golang.org/cl/5601054
2012-01-31 14:02:27 +11:00
Nigel Tao
cc3e6234e7 go.image: initial code.
Manual edits to README.
Moved from main Go repository, deleted Makefiles.

Tested with go test code.google.com/p/go.image/...

Fixes golang/go#2797.

R=rsc, rsc, r
CC=golang-dev
https://golang.org/cl/5593053
2012-01-31 11:32:50 +11:00