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

remove SavePixelData() apis in favour of GetPixelSpan() #628

Merged
merged 1 commit into from
Jun 23, 2018

Conversation

tocsoft
Copy link
Member

@tocsoft tocsoft commented Jun 23, 2018

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

removed all the SavePixelData() apis (as they can cause confusion people see a save method with a byte array and assume its an encoded image they can pass into something else and its not it was just a raw dump of our internal buffer).

To get a copy of the image buffer now you should instead add the using SixLabors.ImageSharp.Advanced; which will expose our Span apis which can be used to access the raw pixel buffer for any inter-op scenarios.

resolves #623

@tocsoft tocsoft added this to the 1.0.0-beta5 milestone Jun 23, 2018
@codecov
Copy link

codecov bot commented Jun 23, 2018

Codecov Report

Merging #628 into master will decrease coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #628      +/-   ##
==========================================
- Coverage   88.63%   88.55%   -0.08%     
==========================================
  Files         884      884              
  Lines       37068    37032      -36     
  Branches     2670     2670              
==========================================
- Hits        32855    32794      -61     
- Misses       3418     3421       +3     
- Partials      795      817      +22
Impacted Files Coverage Δ
tests/ImageSharp.Tests/Image/ImageSaveTests.cs 100% <ø> (ø) ⬆️
src/ImageSharp/ImageExtensions.cs 68.42% <ø> (-0.97%) ⬇️
...ests/Processing/Transforms/AffineTransformTests.cs 98.51% <100%> (-0.02%) ⬇️
...Processing/Transforms/ProjectiveTransformHelper.cs 86.11% <0%> (-11.12%) ⬇️
src/ImageSharp/Common/Helpers/ImageMaths.cs 77.41% <0%> (-6.46%) ⬇️
...sing/Dithering/ErrorDiffusion/ErrorDiffuserBase.cs 93.1% <0%> (-3.45%) ⬇️
...Formats/Jpeg/GolangPort/Components/Decoder/Bits.cs 69.69% <0%> (-3.04%) ⬇️
...sts/Formats/Jpg/DoubleBufferedStreamReaderTests.cs 97.33% <0%> (-2.67%) ⬇️
.../ImageSharp.Tests/TestUtilities/TestEnvironment.cs 81.25% <0%> (-2.09%) ⬇️
...c/ImageSharp/Formats/Png/Zlib/ZlibDeflateStream.cs 61.4% <0%> (-1.76%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4f5b3f...e177932. Read the comment docs.

@tocsoft tocsoft merged commit d715eb1 into master Jun 23, 2018
@tocsoft tocsoft deleted the sw/delete-data-pixel-data branch June 23, 2018 12:34
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.

Remove Image<TPixel>.SavePixelData() api in favour of using Span<T>apis
2 participants