Search found 103 matches

by Jason S
2019-10-03T16:14:58-07:00
Forum: Bugs
Topic: Error image read from windows clipboard (copy from chrome)
Replies: 10
Views: 58923

Re: Error image read from windows clipboard (copy from chrome)

There seems to be at least one ImageMagick bug here. Its clipboard handler manufactures a BMP file header, but in that header it doesn't always set the bfOffBits field correctly. I'm referring to this line in coders/clipboard.c: offset=((unsigned int) p[0])+BMP_HEADER_SIZE; It ought to also add the ...
by Jason S
2019-08-31T11:00:37-07:00
Forum: Bugs
Topic: Convert JPG to PCX
Replies: 4
Views: 41538

Re: Convert JPG to PCX

I think it's bug-like enough to move there. The issue I'm talking about is that some of the 1-bit PCX files created by IM are not as portable as they could be. I believe the cause is the combination of the PaletteType field set to 1, and a white-then-black palette (FF FF FF 00 00 00) at offset 0x10....
by Jason S
2019-08-31T07:30:36-07:00
Forum: Bugs
Topic: Convert JPG to PCX
Replies: 4
Views: 41538

Re: Convert JPG to PCX

I'm not sure I understand your question. But I see that, in some cases, depending on the JPEG, IM (7.0.8) will write a 1-bit PCX file that has [ff ff ff 00 00 00] in the palette area at offset 0x10. And that seems... bad. To the best of my knowledge, there is no portable way for a 1-bit PCX to be an...
by Jason S
2019-08-19T09:24:56-07:00
Forum: Bugs
Topic: Behaviour of -define bmp:subtype=RGB565
Replies: 6
Views: 44748

Re: Behaviour of -define bmp:subtype=RGB565

Your rslt.bmp file looks okay in the viewers and web browsers I tried, and is correct based on what I know about BMP format. But it is an uncommon type of BMP, not supported by everything. I guess you are using a viewer that does not support the combination of a BMPv5 header (which ImageMagick calls...
by Jason S
2018-12-19T12:47:08-07:00
Forum: Users
Topic: convert - PICT to TIFF results in 000000 bytes
Replies: 10
Views: 10572

Re: convert - PICT to TIFF results in 000000 bytes

Your file is a PICT file by all rights, though it's being used as a thin wrapper around a Photo CD (PCD) file. Probably, everything you care about is in the PCD part. It should be safe to delete the correct number of bytes (1202 in this case) from the beginning of the file, and use it as a PCD file....
by Jason S
2018-08-10T19:16:08-07:00
Forum: Users
Topic: BMP compression?
Replies: 5
Views: 8464

Re: BMP compression?

Yeah, your command results in what we're supposing is the smallest uncompressed file size. But it uses a fixed grayscale palette, which is unnecessarily restrictive (though it might not make a huge difference in this case). I don't know much about tuning IM's color quantization. Before long I'd prob...
by Jason S
2018-08-10T17:24:38-07:00
Forum: Users
Topic: BMP compression?
Replies: 5
Views: 8464

Re: BMP compression?

BMP's RLE8 (for 256-color images) and RLE4 (for 16-color images) compression schemes are not too exotic, though I have no way to guess whether your software supports them. And unfortunately, ImageMagick (as of this writing) doesn't encode RLE8 optimally, and AFAIK doesn't encode RLE4 at all. Reducin...
by Jason S
2018-04-13T14:26:16-07:00
Forum: Users
Topic: Saving image as a palette type bmp, even if it is greyscale?
Replies: 6
Views: 10950

Re: Saving image as a palette type bmp, even if it is greyscale?

BMP does not have a grayscale image type. boot.bmp is an 8-bits/pixel RLE-compressed color paletted image, which (I guess) ImageMagick pretends is grayscale, since all its colors are gray. Note the Class is "PseudoClass", which is IM's term for paletted. boot-backup.bmp is a 24-bits/pixel ...
by Jason S
2018-04-07T05:30:48-07:00
Forum: Users
Topic: TIF file with JPEG2000 compression
Replies: 4
Views: 6570

Re: TIF file with JPEG2000 compression

To clarify my libtiff comment, I mean that libtiff does not have an option to compile in JPEG2000 compression support. An app like ImageMagick could presumably implement its own JPEG2000 codec, and register it with libtiff at runtime. But the current version of IM does not appear to ever do that.
by Jason S
2018-04-07T05:02:18-07:00
Forum: Users
Topic: TIF file with JPEG2000 compression
Replies: 4
Views: 6570

Re: TIF file with JPEG2000 compression

I don't think that libtiff directly supports JPEG2000 compression. Can you point me to a sample file, or some format documentation? I'd guess that a single-strip TIFF/JPEG2000 image like yours simply contains an embedded "JPEG 2000 codestream". If so, it should have the byte pattern 0xFF 0...
by Jason S
2018-03-20T12:47:35-07:00
Forum: Bugs
Topic: RGB555/RGB565 etc are not working
Replies: 2
Views: 10844

Re: RGB555/RGB565 etc are not working

(For recent discussion of these options, see https://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=33334 , https://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=33344 .) Right. I didn't make it clear, but these option are implemented as hints . They'll be ignored if, fo...
by Jason S
2018-03-09T12:35:54-07:00
Forum: Bugs
Topic: Reading from Windows clipboard:
Replies: 6
Views: 15496

Re: Reading from Windows clipboard:

Sorry, but I don't think I want to try to make a pull request for this. Even just figuring out the minimal changes to fix the bug would take some time. As for refactoring the whole thing to use CF_DIB, one issue is that ideally I'd want clipboard.c and bmp.c to share a lot of code, and I don't even ...
by Jason S
2018-03-08T12:16:25-07:00
Forum: Bugs
Topic: Reading from Windows clipboard:
Replies: 6
Views: 15496

Re: Reading from Windows clipboard:

I can reproduce this, and it seems like a bug to me. A process should be able to read the same clipboard data multiple times. Looking at the source code, this looks suspicious: coders/clipboard.c: OpenClipboard(NULL); bitmapH=(HBITMAP) GetClipboardData(CF_BITMAP); hPal=(HPALETTE) GetClipboardData(CF...
by Jason S
2018-01-20T09:40:05-07:00
Forum: Users
Topic: Cropping 16 bit .BMP files and maintaining pixel size
Replies: 12
Views: 16973

Re: Cropping 16 bit .BMP files and maintaining pixel size

I haven't looked at this closely, but I confirm that the ARGB1555 option seems to write a 24bpp image if the image has no transparency (and more than 256 colors). If the image has transparency, then it writes a 16bpp image as expected. Looks like a bug to me.
by Jason S
2018-01-12T08:25:30-07:00
Forum: Developers
Topic: Saving a BMP file with 16 bit pixel resolution (5:6:5)
Replies: 7
Views: 35035

Re: Saving a BMP file with 16 bit pixel resolution (5:6:5)

I could not figure out how to download mch's example file with a web browser. What I ended up with was always either a JPEG or HTML file. I was able to download it with wget. It is BMPv3 16-bit RGB555, not RGB565. BMPv3 supports 16-bit images with arbitrary RGB (though not RGBA) color formats. You j...