03-03-2024, 07:56 PM (This post was last modified: 03-03-2024, 08:09 PM by gimpygirl.)
How to extract the tiles (the fonts) of this specific image using ofn-tiles ?
It are not squares
And if it's not possible using ofn-tiles , then I can only do it using below?
- making guides between the tiles
- python_fu_ofn_guillotine_layer
- python_fu_ofn_export_layers
Or is there another more easy way with script/plugin that is available somewhere?
Can I do this with gmic?
(03-03-2024, 07:56 PM)gimpygirl Wrote: How to extract the tiles (the fonts) of this specific image using ofn-tiles ?
It are not squares
And if it's not possible using ofn-tiles , then I can only do it using below?
- making guides between the tiles
- python_fu_ofn_guillotine_layer
- python_fu_ofn_export_layers
Or is there another more easy way with script/plugin that is available somewhere?
You measure the characters, from the top corner of one to the top corner of the one below to the right: 150x416
Your crop the image from the top left corner of the first character, making sure that the result is a multiple of the tile size
You export
Result:
As you have probably noticed, the Heart is a bit truncated because your character aren't as regularly spaced as the look. The left edges are respectively at: 0, 151, 301, 450, 600, 750, 900, 1049, 1199, 1349, 1499, 1648, 1798, 1948, 2098, 2247.
03-04-2024, 01:16 AM (This post was last modified: 03-04-2024, 02:11 AM by gimpygirl.)
(03-03-2024, 08:54 PM)Ofnuts Wrote:
As you have probably noticed, the Heart is a bit truncated because your character aren't as regularly spaced as the look. The left edges are respectively at: 0, 151, 301, 450, 600, 750, 900, 1049, 1199, 1349, 1499, 1648, 1798, 1948, 2098, 2247.
Sorry i dont speak english. What do you mean by "your character aren't as regularly spaced as the look".
It's a big complicated to write a plugin for (for me). I want automatic process since i'm doing many of these images for font making.
I just found g'mic can do it with "extract objects"! They are extracted perfectly.
Do you know if I can make a plugin that calls g'mic and how?
Or how to batch process g'mic on a whole folder of images like the example?
So I want:
1. "extract objects" but the dot must be in the blue area (see image)
2. export all layers using your plugin
is this possible to combine in a plugin (1 + 2)?
I especially need code for 1 (2 I can do now)
If I use ofn-export-layers on the layers g'mic made (see previous example), they are exported by starting from the LAST layer
See screenshot: it starts with number 32. You know why?
see next screenshot: the result of ofn-export-layers (with numUp0). I need the reverse order
Can you add an option to ofn-export-layers to export the layers reverse order so the numUp0 is starting from 0 and corresponds to the first symbol in the image from left to right?
Maybe checkbox "reverse layer order"?
03-04-2024, 09:09 AM (This post was last modified: 03-04-2024, 09:10 AM by Ofnuts.)
(03-04-2024, 01:16 AM)gimpygirl Wrote: Sorry i dont speak english. What do you mean by "your character aren't as regularly spaced as the look".
Besides the typo "the/they". You would expect the distance between consecutive characters to be constant, but here it varies between 149 and 151 pixels. And IMHO this is due to some scaling that happened earlier in the workflow and that should have been avoided.
Quote:It's a big complicated to write a plugin for (for me). I want automatic process since i'm doing many of these images for font making.
I just found g'mic can do it with "extract objects"! They are extracted perfectly.
Do you know if I can make a plugin that calls g'mic and how?
Or how to batch process g'mic on a whole folder of images like the example?
So I want:
1. "extract objects" but the dot must be in the blue area (see image)
2. export all layers using your plugin
is this possible to combine in a plugin (1 + 2)?
I especially need code for 1 (2 I can do now)
I have no experience with GMIC scripting. Although it seems to solve your problem, you may end up with characters of varying widths.
Quote:If I use ofn-export-layers on the layers g'mic made (see previous example), they are exported by starting from the LAST layer
See screenshot: it starts with number 32. You know why?
see next screenshot: the result of ofn-export-layers (with numUp0). I need the reverse order
Can you add an option to ofn-export-layers to export the layers reverse order so the numUp0 is starting from 0 and corresponds to the first symbol in the image from left to right?
Maybe checkbox "reverse layer order"?
Did you ever wonder why the variable is called numUp? And then wonder if there could possibly be something called numDown?