I have some simple questions about magicknet's functionallity and if it provides the neccessary functions for my behaviour.
I want to merge .xcf-Files with an number of layers which each represents an area for a specific text. Each layer/area has a specific name (the Name of the layer in Gimp) which provides information about the Text which should be written into. E.g "Title", "Subtitle", "Company" and so on.
Now I have a number of different xcf-files with the same layer-names and I want to merge the Text automatically. Preferably i would do this via magickscript - One ore more scripts for each xcf which i call via Code.
So my questions are:
- is it possible to get the layers by Name ? E.g Like myXcf["titleLayer"] ...
- in Gimp, the layers have yellow borders which define the area the Text should be written. Is ist possible to get the Position and size of these areas?
- does magicknet provide functions for adding textblocks with specific font and fontsize?
- in some cases i need to prefer the transparancy.
Best regards
Morv
Image Textmerge
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Image Textmerge
No. IM can't read Gimp's layer names. But a batch script can tell Gimp to write the layer nmes to a text file, or write a tiff with layer names that IM cn read. See my "Gimp and IM" page.Morv wrote:- is it possible to get the layers by Name ? E.g Like myXcf["titleLayer"] ...
Yes. If you have no other yellow on your image, the task is trivial: trimming non-yellow gives the location.Morv wrote:- in Gimp, the layers have yellow borders which define the area the Text should be written. Is ist possible to get the Position and size of these areas
Yes, you can add text with font and font size.Morv wrote:- does magicknet provide functions for adding textblocks with specific font and fontsize?
snibgo's IM pages: im.snibgo.com
Re: Image Textmerge
Ah, thank you!
I think you missunderstood the yellow borders, they are only visible in Gimp, when i select one of the layers. So, I cant her the Position and size via trimming yellow. So you think there is any other way for achieving this?
Had a look at your Page yesterday, very nice Work !
Best regards
I think you missunderstood the yellow borders, they are only visible in Gimp, when i select one of the layers. So, I cant her the Position and size via trimming yellow. So you think there is any other way for achieving this?
Had a look at your Page yesterday, very nice Work !
Best regards
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Image Textmerge
If there is, it would come from Gimp, not ImageMagick.Morv wrote:So you think there is any other way for achieving this?
snibgo's IM pages: im.snibgo.com
Re: Image Textmerge
We've changed the Concept and now will use MagickScript for merging the Texts into/onto the images. We will define some xml-Files with some kind of Placeholders for the Text which we will replace with different Content.
Current test.xml looks like this.
I have Problems placing the Text into predefined Areas (in the xml) so that I can Center them content-independent. For example we want to use the same xml for different Languages, and the Text should be centered in predefined Areas regardless of the textlength.
Thanks for any Help
Current test.xml looks like this.
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<msl xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MagickScript.xsd">
<read>
<draw >
<font family="DINRoundOT-Medium" />
<fontPointSize pointSize="140"/>
<fillColor color="#FFF"/>
<text value="Foo" x="100" y="350"/>
</draw>
<draw >
<font family="DINRoundOT-Medium" />
<fontPointSize pointSize="140"/>
<fillColor color="#FFF"/>
<text value="Baa" x="150" y="650"/>
</draw>
</read>
</msl>
Thanks for any Help
Re: Image Textmerge
Do you have an example of what kind of areas you want to put your text in?