Commit Graph

9 Commits

Author SHA1 Message Date
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