Search found 12 matches
- 2018-05-31T17:32:41-07:00
- Forum: Users
- Topic: Separating characters in a font file
- Replies: 15
- Views: 11318
Re: Separating characters in a font file
Thanks, interesting idea. Even if it doesn't really solve our problem, I should definitely check out that route!
- 2018-05-31T15:52:35-07:00
- Forum: Users
- Topic: Separating characters in a font file
- Replies: 15
- Views: 11318
Re: Separating characters in a font file
Ok, here's the result I'm getting: http://users.telenet.be/guy.lateur/IM/OUT3.png
Here's the python script that generates this result:
import subprocess
import BBox # custom Bounding Box class BBox & utilities
filename = "\"" + r"F:\Amiga\_bmp\Fonts\IN3.png" + "\""
fileoutbboxes = "\"" + r"F ...
Here's the python script that generates this result:
import subprocess
import BBox # custom Bounding Box class BBox & utilities
filename = "\"" + r"F:\Amiga\_bmp\Fonts\IN3.png" + "\""
fileoutbboxes = "\"" + r"F ...
- 2018-05-30T15:21:35-07:00
- Forum: Users
- Topic: Separating characters in a font file
- Replies: 15
- Views: 11318
Re: Separating characters in a font file
You can certainly do it more manually. From the white and black image, scale to a single row. PIxels in this Nx1 image that are black are between the characters, so that gives you the left/right boundaries. Then crop the white/black image to those boundaries, and trim gives you the top/bottom ...
- 2018-05-30T14:51:16-07:00
- Forum: Users
- Topic: Separating characters in a font file
- Replies: 15
- Views: 11318
Re: Separating characters in a font file
You could create an image of each character and use -debug annotate to find the glyph characteristics. See http://www.imagemagick.org/Usage/text/#font_info.
Alternately, you could do the blur and then reduces the bounding box by the blur distance.
Thanks, I'll look into the font info thing. I'm ...
- 2018-05-30T14:19:48-07:00
- Forum: Users
- Topic: Separating characters in a font file
- Replies: 15
- Views: 11318
Re: Separating characters in a font file
Ah, yes, I remembered about dotted ij etc but then forgot. Just blur vertically, eg with "-morphology Convolve Blur:0x10,90", before changing the colours. But that messes with the top and bottom of the bounding rectangle. Hmm... thinking ...
But surely that will give bounding boxes that are too ...
- 2018-05-30T14:03:52-07:00
- Forum: Users
- Topic: Separating characters in a font file
- Replies: 15
- Views: 11318
Re: Separating characters in a font file
Thank you both for your suggestions; that's already a very big step in the right direction! :)
Unfortunately, I don't think the 'connected-components' approach is going to take us all the way there. Consider this source font file: http://users.telenet.be/guy.lateur/IM/testFonts-003-cropped.png
If ...
Unfortunately, I don't think the 'connected-components' approach is going to take us all the way there. Consider this source font file: http://users.telenet.be/guy.lateur/IM/testFonts-003-cropped.png
If ...
- 2018-05-30T12:39:47-07:00
- Forum: Users
- Topic: Separating characters in a font file
- Replies: 15
- Views: 11318
Separating characters in a font file
I'm using ImageMagick 7.0.7-35 Q16 x64 2018-05-21 on win7pro.
I'm looking to separate the characters in a 'bitmap-font-file'. Suppose I had a file like this: http://users.telenet.be/guy.lateur/IM/testFonts-002-cropped.png
I want to calculate the bounding rectangles around each character. Let's ...
I'm looking to separate the characters in a 'bitmap-font-file'. Suppose I had a file like this: http://users.telenet.be/guy.lateur/IM/testFonts-002-cropped.png
I want to calculate the bounding rectangles around each character. Let's ...
- 2018-05-29T04:03:13-07:00
- Forum: Users
- Topic: Color reduction and using palettes
- Replies: 8
- Views: 15138
Re: Color reduction and using palettes
The extra colormap entry seems to be the background colour (which defaults to white, but can be changed with "-background"). To avoid that being added to the colormap, excluding the PNG background chunk seems to work:
f:\web\im>%IMG7%magick convert IN-colormap17.jpg -colors 16 -background red ...
- 2018-05-29T03:44:20-07:00
- Forum: Users
- Topic: Color reduction and using palettes
- Replies: 8
- Views: 15138
Re: Color reduction and using palettes
I suggest you add +dither or -dither none before -colors to avoid getting dithered results.
Thanks for the tip, I'm aware of that switch. I don't think it'll be a question of always having dither on or off. Sometimes (like with a picture) dithering can be beneficial to the overall quality ...
- 2018-05-28T16:32:14-07:00
- Forum: Users
- Topic: Color reduction and using palettes
- Replies: 8
- Views: 15138
Re: Color reduction and using palettes
About 1): here's the input: http://users.telenet.be/guy.lateur/IM/IN-colormap17.jpg
Here's the output I get: http://users.telenet.be/guy.lateur/IM/OUT-16-8.png
As mentioned, this is the command that generates that:
magick convert IN-colormap17.jpg -colors 16 -depth 8 OUT-16-8.png
About 2 ...
Here's the output I get: http://users.telenet.be/guy.lateur/IM/OUT-16-8.png
As mentioned, this is the command that generates that:
magick convert IN-colormap17.jpg -colors 16 -depth 8 OUT-16-8.png
About 2 ...
- 2018-05-28T15:26:47-07:00
- Forum: Users
- Topic: Color reduction and using palettes
- Replies: 8
- Views: 15138
Re: Color reduction and using palettes
ImageMagick 7.0.7-35 Q16 x64 2018-05-21, on win10pro.
1) convert IN.jpg -colors 16 -depth 8 OUT.png
The input is a picture of 2 people; nothing special.
2) Ok, I'll look into the remap option, thanks. And about not using all colors: I've had conversions to 16 color palettes (4 bits/channel) that ...
1) convert IN.jpg -colors 16 -depth 8 OUT.png
The input is a picture of 2 people; nothing special.
2) Ok, I'll look into the remap option, thanks. And about not using all colors: I've had conversions to 16 color palettes (4 bits/channel) that ...
- 2018-05-28T14:41:03-07:00
- Forum: Users
- Topic: Color reduction and using palettes
- Replies: 8
- Views: 15138
Color reduction and using palettes
Hi all, new user here, so please bear with me.. ;)
I'm trying to use IM in my 'modern day Amiga workflow'. I'll usually be starting from a high resolution 8bit/channel image that has, say, been rendered in Blender. I'll need to convert this image to a low resolution paletted/color-indexed version ...
I'm trying to use IM in my 'modern day Amiga workflow'. I'll usually be starting from a high resolution 8bit/channel image that has, say, been rendered in Blender. I'll need to convert this image to a low resolution paletted/color-indexed version ...