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

offset generic array back to 1-based indexing array #12

Merged
merged 2 commits into from
May 19, 2021
Merged

Conversation

johnnychen94
Copy link
Member

Some image processing operations will produce OffsetArray as an output, in which case convert(Array{T, N}, img::OffsetArray) does not work.

For example,

using ImageTransformations, TestImages, Sixel
img = testimage("camera")
imgr = imrotate(img, 0.4) # 672×672 OffsetArray(::Array{Gray{N0f8},2}, -79:592, -79:592)
sixel_encode(imgr) # errors

With this PR:

demo

@codecov
Copy link

codecov bot commented May 19, 2021

Codecov Report

Merging #12 (205b669) into master (dc3f05f) will increase coverage by 0.36%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #12      +/-   ##
==========================================
+ Coverage   38.05%   38.41%   +0.36%     
==========================================
  Files          10       10              
  Lines         339      341       +2     
==========================================
+ Hits          129      131       +2     
  Misses        210      210              
Impacted Files Coverage Δ
src/Sixel.jl 100.00% <ø> (ø)
src/encoder.jl 87.50% <100.00%> (+1.78%) ⬆️

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 dc3f05f...205b669. Read the comment docs.

@johnnychen94 johnnychen94 merged commit aca328b into master May 19, 2021
@johnnychen94 johnnychen94 deleted the jc/offset branch May 19, 2021 06:42
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.

1 participant