Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Trouble exporting 8 bit .bmp from Julia wrapper #310

Closed
orswan opened this issue Feb 28, 2024 · 1 comment
Closed

Trouble exporting 8 bit .bmp from Julia wrapper #310

orswan opened this issue Feb 28, 2024 · 1 comment

Comments

@orswan
Copy link

orswan commented Feb 28, 2024

ImageMagick version

6

Operating system

Windows

Operating system, version and so on

Windows 11

Description

I use ImageMagick through the Julia ImageMagick.jl wrapper. I am trying to save an image as an 8 bit .bmp, and am unable to do so. I filed a bug report with a relevant Julia package (JuliaImages/juliaimages.github.io#260), and they informed me that the problem was with ImageMagick itself.

(Unfortunately, I am not sure how to determine which subversion of ImageMagick is being used.)

Steps to Reproduce

In Julia:

using Images, FileIO
#dir = "/path/to/dir"
im_large = n0f16.(Gray.(rand(100,100)))
save(dir * "large.bmp",im_large)
im_small = n0f8.(Gray.(rand(100,100)))
save(dir * "small.bmp",im_small)

Both saved bmp files end up having bit depth 24 on my system.

Images

No response

@dlemstra
Copy link
Member

As you mentioned yourself in that other issue you will need to change the image to grayscale. 24 bit is shown on Windows because you have three 8-bit channels. But I don't know the Julia api call that will change the image to grayscale.

@ImageMagick ImageMagick locked and limited conversation to collaborators Feb 29, 2024
@dlemstra dlemstra converted this issue into discussion #311 Feb 29, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Development

No branches or pull requests

2 participants