diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ef659743..596494cf7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,8 +28,8 @@ jobs: #- '1.7' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. - '~1.10.0-0' #- '~1.11.0-0' - - '~1.12.0-0' - - 'nightly' + #- '~1.12.0-0' + #- 'nightly' os: - ubuntu-latest #- ubuntu-20.04 diff --git a/src/gmt_main.jl b/src/gmt_main.jl index 288358b62..191050980 100644 --- a/src/gmt_main.jl +++ b/src/gmt_main.jl @@ -990,7 +990,7 @@ function image_init(API::Ptr{Nothing}, Img::GMTimage)::Ptr{GMT_IMAGE} img = copy(Img.image) GMT_Change_Layout(API, GMT_IS_IMAGE, "BRP", 0, I, img); # Convert to BRP. Not 100% on the > 2 though. elseif (!mem_owned_by_gmt && size(img,3) == 1 && Img.layout[2] == 'C') - img = fliplr(img') + img = (Img.layout[1] == 'T') ? collect(img') : fliplr(img') # T(o) case doesn't need a fliud (that is a fliplr because transposition) end Ib.data = pointer(img) unsafe_store!(I, Ib) diff --git a/src/imshow.jl b/src/imshow.jl index 0c956c7e9..73882b585 100644 --- a/src/imshow.jl +++ b/src/imshow.jl @@ -62,8 +62,8 @@ function imshow(arg1, x::AbstractVector{Float64}=Float64[], y::AbstractVector{Fl !is_image && (Gg = arg1) #snif_GI_set_CTRLlimits(arg1) # Set CTRL.limits to be eventually used by J=:guess end - elseif (isa(arg1, Array{UInt8}) || isa(arg1, Array{UInt16,3})) - Gi = mat2img(arg1; kw...) + elseif (isa(arg1, Array{UInt8}) || isa(arg1, Array{UInt16,3}) || isa(arg1, Array{Bool}) || isa(arg1, BitMatrix)) + Gi = isa(arg1, BitMatrix) ? mat2img(collect(arg1); kw...) : mat2img(arg1; kw...) call_img = true elseif (isa(arg1, GDtype) || isa(arg1, GMTfv) || isa(arg1, Vector{GMTfv}) || (isa(arg1, AbstractVecOrMat{<:Real}) && size(arg1,2) <= 4) || (isa(arg1, Gdal.AbstractDataset) || isa(arg1, Gdal.AbstractGeometry))) (isa(arg1, Gdal.AbstractDataset) || isa(arg1, Gdal.AbstractGeometry)) && (arg1 = gd2gmt(arg1))