Skip to content

pass extra save_stream keywords to image2wand#199

Merged
johnnychen94 merged 4 commits intomasterfrom
jc/stream_kw
Mar 16, 2021
Merged

pass extra save_stream keywords to image2wand#199
johnnychen94 merged 4 commits intomasterfrom
jc/stream_kw

Conversation

@johnnychen94
Copy link
Copy Markdown
Member

@johnnychen94 johnnychen94 commented Mar 11, 2021

Similar to the save_ method for filename, this PR passes extra keywords to image2wand. An example of this is a stream gif saving with fps keyword. (JuliaImages/ImageShow.jl#30)

Also fixes a FileIO depwarn in the tests.

@johnnychen94 johnnychen94 changed the title pass save_stream keyword to image2wand pass extra save_stream keywords to image2wand Mar 11, 2021
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2021

Codecov Report

Merging #199 (3d6cb56) into master (47fdb39) will increase coverage by 4.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
+ Coverage   70.52%   74.58%   +4.05%     
==========================================
  Files           3        3              
  Lines         397      421      +24     
==========================================
+ Hits          280      314      +34     
+ Misses        117      107      -10     
Impacted Files Coverage Δ
src/ImageMagick.jl 84.21% <100.00%> (+8.68%) ⬆️
src/precompile.jl 82.05% <0.00%> (+0.97%) ⬆️
src/libmagickwand.jl 66.95% <0.00%> (+1.51%) ⬆️

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 47fdb39...3d6cb56. Read the comment docs.

@johnnychen94
Copy link
Copy Markdown
Member Author

johnnychen94 commented Mar 12, 2021

The failure in ubuntu is reproducible locally and seems to be an SSL certificate issue.

julia> download("http://magnushoff.com/assets/test-exiforientation.zip")
┌ Error: Download failed: curl: (60) SSL certificate problem: unable to get local issuer certificate
└ @ Base download.jl:43
ERROR: failed process: Process(`curl -s -S -g -L -f -o /tmp/jl_3ekIQ8 http://magnushoff.com/assets/test-exiforientation.zip`, ProcessExited(60)) [60]

fn = joinpath(workdir, "2by2_fromstream.png")
open(fn, "w") do f
ImageMagick.save(Stream(format"PNG", f), orig_img)
ImageMagick.save(Stream{format"PNG"}(f), orig_img)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Interesting how much disruption this depwarn causes. Tests will fail unless FileIO >= 1.6, but I guess we can live with that, and it won't happen in CI or an update test environment.

@timholy
Copy link
Copy Markdown
Member

timholy commented Mar 12, 2021

The failure in ubuntu is reproducible locally and seems to be an SSL certificate issue.

Interesting. Can we generate a "data artifact" and stop worrying about downloading this freshly each time? I haven't really followed that world very well.

@johnnychen94
Copy link
Copy Markdown
Member Author

johnnychen94 commented Mar 12, 2021

This file is only 4Kb (less than the 4kb block size) so I think we're good to commit it to the git?

@timholy
Copy link
Copy Markdown
Member

timholy commented Mar 12, 2021

That works for me unless there's some license/whatever reason that we can't.

so as to avoid SSL issue when downloading http://magnushoff.com/assets/test-exiforientation.zip

this zip file is less than 4Kb so won't be an issue by directly commiting it into git
@johnnychen94 johnnychen94 merged commit 52bb204 into master Mar 16, 2021
@johnnychen94 johnnychen94 deleted the jc/stream_kw branch March 16, 2021 02:31
johnnychen94 added a commit that referenced this pull request Apr 15, 2021
Similar to the save_ method for filename, this PR passes extra keywords to image2wand. An example of this is a stream gif saving with fps keyword.

Also fixes a FileIO depwarn in the tests.
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.

2 participants