Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ExtractBandToImage #324

Merged
merged 3 commits into from
Nov 5, 2022
Merged

add ExtractBandToImage #324

merged 3 commits into from
Nov 5, 2022

Conversation

roffe
Copy link
Contributor

@roffe roffe commented Nov 5, 2022

Function will allow extracting band(s) into a new image not overwriting the original image reference

roffe added 2 commits November 5, 2022 13:38
Add function to extract a band into a new image instead of replacing the current image ref
@roffe
Copy link
Contributor Author

roffe commented Nov 5, 2022

I found myself having to do img2 := img.Copy() -> img2.ExtractBand to get alpha channel out of a image and having to copy the whole image first to do it sounds very innefficient

@tonimelisma
Copy link
Collaborator

tonimelisma commented Nov 5, 2022

Hey @roffe. Thank you very much for the contribution! Did you check out the contribution document? Would you mind writing unit tests, passing and failing ones? Perhaps some of the golden tests, too?

@coveralls
Copy link

coveralls commented Nov 5, 2022

Coverage Status

Coverage increased (+0.01%) to 76.92% when pulling 109cf57 on roffe:patch-1 into 7881bfa on davidbyttow:master.

Copy link
Collaborator

@tonimelisma tonimelisma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tonimelisma tonimelisma merged commit e407ec7 into davidbyttow:master Nov 5, 2022
@roffe roffe deleted the patch-1 branch November 5, 2022 17:23
@roffe
Copy link
Contributor Author

roffe commented Nov 5, 2022

thank you very much

Elad-Laufer pushed a commit to wix-incubator/govips-contrib that referenced this pull request Nov 22, 2022
* Update image.go

Add function to extract a band into a new image instead of replacing the current image ref

* Update image.go

* add test

Co-authored-by: Roffe <roffe@roffe.nu>
Elad-Laufer added a commit to wix-playground/govips that referenced this pull request Nov 22, 2022
* Original image type (davidbyttow#299)

* - add golden

* - freeCString abstraction

* When implicitly converting the image type (BMP to PNG), keep the original format available for query

* gaussian blur support min_ampl (davidbyttow#307)

Co-authored-by: muyouran <muyouran@pinduoduo.com>

* Add APIs to get image EXIF data and ICC profile data (davidbyttow#317)

* Add support for high-bit-depth AVIF and HEIF images (davidbyttow#322)

* Fix bug with icc transform bit depth (davidbyttow#323)

* Determine libvips version runtime (davidbyttow#320)

* add ExtractBandToImage (davidbyttow#324)

* Update image.go

Add function to extract a band into a new image instead of replacing the current image ref

* Update image.go

* add test

Co-authored-by: Roffe <roffe@roffe.nu>

* BandSplit() split an n-band image into n separate images (davidbyttow#326)

* BandSplit() split an n-band image into n separate images

* move tests

Co-authored-by: Roffe <roffe@roffe.nu>

* Bump CI to latest Ubuntu (davidbyttow#329)

* Improved exif extraction (davidbyttow#325)

* Add support for reading + writing EXIF data

* Fix test for removing exif

* Cleanup tests

* Fix removes exif test on ubuntu

* TIFF may not iptc data

* Cleanup test images

* add images for ubuntu 22 lts (davidbyttow#328)

Co-authored-by: Roffe <roffe@roffe.nu>

* don't use deprecated functions

Co-authored-by: Qisen <1620671486@qq.com>
Co-authored-by: muyouran <muyouran@pinduoduo.com>
Co-authored-by: Logan Shire <logan.shire@gmail.com>
Co-authored-by: tgmpje <65441725+tgmpje@users.noreply.github.com>
Co-authored-by: Joakim Karlsson <5434736+roffe@users.noreply.github.com>
Co-authored-by: Roffe <roffe@roffe.nu>
Co-authored-by: Toni Melisma <59022391+tonimelisma@users.noreply.github.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.

3 participants