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

Reading from an IOBuffer broke in 1.11 #231

Closed
KristofferC opened this issue Apr 22, 2024 · 1 comment
Closed

Reading from an IOBuffer broke in 1.11 #231

KristofferC opened this issue Apr 22, 2024 · 1 comment

Comments

@KristofferC
Copy link
Member

The implementation of the IOBuffer reading (#180) uses the internal .data field and no longer works:

Reading from an IOBuffer (issue https://github.com/JuliaIO/FileIO.jl/issues/174): Error During Test at /home/pkgeval/.julia/packages/ImageMagick/iVjQq/test/constructed_images.jl:233
  Got exception outside of a @test
  MethodError: no method matching readimage(::MagickWand, ::Memory{UInt8})
  The function `readimage` exists, but no method is defined for this combination of argument types.
  
  Closest candidates are:
    readimage(::MagickWand, !Matched::IOBuffer)
     @ ImageMagick ~/.julia/packages/ImageMagick/iVjQq/src/libmagickwand.jl:290
    readimage(::MagickWand, !Matched::Vector{UInt8})
     @ ImageMagick ~/.julia/packages/ImageMagick/iVjQq/src/libmagickwand.jl:284
    readimage(::MagickWand, !Matched::IO)
     @ ImageMagick ~/.julia/packages/ImageMagick/iVjQq/src/libmagickwand.jl:278
    ...
  
  Stacktrace:
    [1] readimage(wand::MagickWand, stream::IOBuffer)
      @ ImageMagick ~/.julia/packages/ImageMagick/iVjQq/src/libmagickwand.jl:290
    [2] load_(file::IOBuffer, permute_horizontal::Bool; ImageType::Type, extraprop::String, extrapropertynames::Nothing, view::Bool)
      @ ImageMagick ~/.julia/packages/ImageMagick/iVjQq/src/ImageMagick.jl:145
    [3] load_(file::IOBuffer, permute_horizontal::Bool)
      @ ImageMagick ~/.julia/packages/ImageMagick/iVjQq/src/ImageMagick.jl:137
    [4] load(::IOBuffer; key_args::@Kwargs{})
      @ ImageMagick ~/.julia/packages/ImageMagick/iVjQq/src/ImageMagick.jl:130

Also, I think this implementation is buggy since it doesn't consider e.g. the position of the IOBuffer.

@dgleich
Copy link
Member

dgleich commented Oct 16, 2024

This is fixed in master now

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

No branches or pull requests

2 participants