Skip to content

Commit

Permalink
fix test by always going to rgba
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed Feb 20, 2025
1 parent be3ad33 commit 877afee
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ReferenceTests/src/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ function get_frames(a, b)
return (get_frames(a), get_frames(b))
end

rgbf_convert(x::AbstractMatrix{<:RGB}) = convert(Matrix{RGBf}, x)
rgbf_convert(x::AbstractMatrix{<:RGBA}) = convert(Matrix{RGBAf}, x)
rgbaf_convert(x::AbstractMatrix{<:Union{RGB,RGBA}}) = convert(Matrix{RGBAf}, x)

function get_frames(video::AbstractString)
mktempdir() do folder
Expand All @@ -25,8 +24,8 @@ end

function compare_images(a::AbstractMatrix{<:Union{RGB,RGBA}}, b::AbstractMatrix{<:Union{RGB,RGBA}})

a = rgbf_convert(a)
b = rgbf_convert(b)
a = rgbaf_convert(a)
b = rgbaf_convert(b)

if size(a) != size(b)
@warn "images don't have the same size, difference will be Inf"
Expand Down

0 comments on commit 877afee

Please sign in to comment.