Issue on long text using caption
Issue on long text using caption
I have a problem with generating long text in ImageMagick, the text is cut and it doesn't display all the text. Here is my script:
convert -size 1000x -background "#FFFFFF" -font Arial -pointsize 20 -fill "#000000" -gravity west caption:"A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking. Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as \\\"the simplest online database that could possibly work.\\\"[4] \\\"Wiki\\\" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning \\\"fast\\\" or \\\"quick\\\".[5]\n\n A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking. Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as \\\"the simplest online database that could possibly work.\\\"[4] \\\"Wiki\\\" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning \\\"fast\\\" or \\\"quick\\\".[5]\n\n A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking. Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as \\\"the simplest online database that could possibly work.\\\"[4] \\\"Wiki\\\" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning \\\"fast\\\" or \\\"quick\\\".[5]\n\n A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking. Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as \\\"the simplest online database that could possibly work.\\\"[4] \\\"Wiki\\\" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning \\\"fast\\\" or \\\"quick\\\".[5]\n\n A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking. Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as \\\"the simplest online database that could possibly work.\\\"[4] \\\"Wiki\\\" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning \\\"fast\\\" or \\\"quick\\\".[5]" -density 9 text.png
This is my test text:
A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking.
Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content.
Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as "the simplest online database that could possibly work."[4] "Wiki" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning "fast" or "quick".[5]
It is copied and pasted 5x.
Thanks in advance.
convert -size 1000x -background "#FFFFFF" -font Arial -pointsize 20 -fill "#000000" -gravity west caption:"A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking. Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as \\\"the simplest online database that could possibly work.\\\"[4] \\\"Wiki\\\" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning \\\"fast\\\" or \\\"quick\\\".[5]\n\n A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking. Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as \\\"the simplest online database that could possibly work.\\\"[4] \\\"Wiki\\\" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning \\\"fast\\\" or \\\"quick\\\".[5]\n\n A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking. Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as \\\"the simplest online database that could possibly work.\\\"[4] \\\"Wiki\\\" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning \\\"fast\\\" or \\\"quick\\\".[5]\n\n A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking. Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as \\\"the simplest online database that could possibly work.\\\"[4] \\\"Wiki\\\" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning \\\"fast\\\" or \\\"quick\\\".[5]\n\n A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking. Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as \\\"the simplest online database that could possibly work.\\\"[4] \\\"Wiki\\\" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning \\\"fast\\\" or \\\"quick\\\".[5]" -density 9 text.png
This is my test text:
A wiki (i/ˈwɪki/ wik-ee) is a website whose users can add, modify, or delete its content via a web browser using a simplified markup language or a rich-text editor.[1][2][3] Wikis are typically powered by wiki software and are often created collaboratively by multiple users. Examples include community websites, corporate intranets, knowledge management systems, and notetaking.
Wikis may serve many different purposes. Some permit control over different functions (levels of access). For example, editing rights may permit changing, adding or removing material. Others may permit access without enforcing access control. Other rules may also be imposed for organizing content.
Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described it as "the simplest online database that could possibly work."[4] "Wiki" (pronounced [ˈwiti] or [ˈviti]) is a Hawaiian word meaning "fast" or "quick".[5]
It is copied and pasted 5x.
Thanks in advance.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Issue on long text using caption
Yes I believe there is a current limit (painful though it is) of 4 kbytes in a lot of string handling in IM.
Painful though it is!
Remember IM is mostly written in C and not in language that handle strings of infinite length (like perl).
Unless the programmer puts in a lot of effort to ensure 'infinite strings' can be used, well they simple can't.
It isn't just a matter of input (the string on command lines are just passed), but the percent escape handler that will need to be modified to allow for infinite string handling. It is that handler that would be causing the string to be truncated due to its buffer limits.
As IMv7 will be working with scripts, and pipelines. this type of problem may become more common and as such require to be looked at.
In the mean time you are welcome to have a look at the code to see what can be done, OR point out some module that will improve this type of thing.
Painful though it is!
Remember IM is mostly written in C and not in language that handle strings of infinite length (like perl).
Unless the programmer puts in a lot of effort to ensure 'infinite strings' can be used, well they simple can't.
It isn't just a matter of input (the string on command lines are just passed), but the percent escape handler that will need to be modified to allow for infinite string handling. It is that handler that would be causing the string to be truncated due to its buffer limits.
As IMv7 will be working with scripts, and pipelines. this type of problem may become more common and as such require to be looked at.
In the mean time you are welcome to have a look at the code to see what can be done, OR point out some module that will improve this type of thing.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Issue on long text using caption
I'm glad to accept your offer. I'll see if I can contribute something for this issue. Thanks.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Issue on long text using caption
In the meantime, I believe that you can put your text into a text file and then convert that to an image
convert textfile.txt textfile.gif
convert textfile.txt textfile.gif
Re: Issue on long text using caption
I'm curios about what will be the features of IM7. Can you give me some features of it so that we can see if it will affect some of the features of our project? Right now we are using 6.7.3-1. Thanks.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Issue on long text using caption
Sorry fred, all that does is read the text file into a string. You will then have the same buffer limit problems as before.In the meantime, I believe that you can put your text into a text file and then convert that to an image
convert textfile.txt textfile.gif
I will however be sure that script tokenization part has not token limits. Though that does not help in other areas of the library.
Made a separate topic... IMv7 What is Happening...xerenader wrote:I'm curios about what will be the features of IM7. Can you give me some features of it so that we can see if it will affect some of the features of our project? Right now we are using 6.7.3-1. Thanks.
viewtopic.php?f=1&t=20429#p81541
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Issue on long text using caption
We have a patch in ImageMagick 6.7.5-8 to permit infinite caption lengths. The patch will be available by sometime tomorrow.
Re: Issue on long text using caption
Great! I'm looking forward to this. Thanks!
Re: Issue on long text using caption
I downloaded ImageMagick 6.7.5-8 and tested it but my text is cut just like my previous problem. Why this happens? Thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Issue on long text using caption
Your long text seems to work for me under IM 6.7.5.10 Q16 Mac OSX Snow Leopard. However, it appears to me that it is right justified (-gravity east?) rather than left justified (-gravity west), unless I misunderstand how -gravity is used in caption:
Note I am compiled with PANGO, so that might be an issue regarding the justification. There were some bugs that were just worked out in this last version of IM regarding caption: using PANGO.
Note I am compiled with PANGO, so that might be an issue regarding the justification. There were some bugs that were just worked out in this last version of IM regarding caption: using PANGO.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Issue on long text using caption
cabeenly wrote:It is normal for me with ImageMagick 6.7.5-8!
Do you mean that you get the correct results also. If so what platform are you using and is IM using PANGO or not?
Re: Issue on long text using caption
Thanks. It's working now on IM 6.7.5-10