Giter Club home page Giter Club logo

Comments (4)

Evizero avatar Evizero commented on August 19, 2024

interestingly i don't quite get the same result

julia> restrict([0 1 0][:])
2-element Array{Float64,1}:
 0.25
 0.25

julia> restrict([0 1 0])
1×2 Array{Float64,2}:
 0.25  0.125

from imagetransformations.jl.

johanneslotz avatar johanneslotz commented on August 19, 2024

I am using julia version 0.6.2 on Linux and a fresh Pkg.add("Images") (today, in a separate docker container). I am also seeing this on my Mac (also on 0.6.2, packages are not all up-to-date).

My results are changing from time to time. I got your results a few minutes ago but after adding and removing a few zeros and spaces, I get very large (changing) numbers again in the last component. Looks like some memory corruption.

julia> restrict([0 0 0 1 0])
1×3 Array{Float64,2}:
 0.0  0.25  0.125

julia> restrict([0 0 0 1 0])
1×3 Array{Float64,2}:
 0.0  0.25  1.75809e13

from imagetransformations.jl.

Evizero avatar Evizero commented on August 19, 2024

maybe there are multiple issues here. I'll have to look into it when I find some time. Thanks for opening the issue.

from imagetransformations.jl.

Evizero avatar Evizero commented on August 19, 2024

Ok i found the culprit. You were correct in your assumption. It is in fact a out-of-bounds memory access hidden by the @inbounds macro here: https://github.com/JuliaImages/ImageTransformations.jl/blob/master/src/resizing.jl#L126-L136

Unsure what the proper way to fix this is. One option is to make restricting a length 1 dimension a noop. Another option is to to just throw a more informative error message.

from imagetransformations.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.