IM Example Contributions (How To)

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
anthony
Posts: 8867
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

IM Example Contributions (How To)

Post by anthony » 2012-03-23T00:37:54-07:00

I noticed some areas of the site that are under contruction or awaiting examples. I'm willing to help fill in those blanks. Will simple patches work for the text?
I reguarly incorperate examples discussed in the IM discussion Forum, so feel free to post examples on how to do something in one of the forums. Input images and example results can be links directly from IM examples images directory, or some other image source. This can be preferable as others can then comment and/or make suggestions, or find better or alternative ways to achieve the same results. You may learn something -- I learn new technques all the time this way.

A public Dropbox folder, makes a good place to upload example results, data, or even HTML pages. Unlike specialised image sites dropbox does not place restrictions on the data types that can be seen. And no you do not need to use their 'syncronization' software to use it, I don't! I use dropbox all the time to provide all sorts of results for forum discussion, as long as you keep the images small the 'free' quota is more than enough for hundreds of images. There are of course other solutions for pubilc upload areas of just a few Gigabytes that can be used.

You can sending me a tar/zip archive or link with larger example contributions (give me a day or so heads up before mailing). Either as unformated text. Or you can download and edit the IM Examples "index.html" files directly. The "Usage with Windows" and "Lens Correction" sections of IM Examples were major contributions of this kind, and both sections have been expanded since that initial contribution.

NOTE about IM Usage Examples... Do not use a 'HTML' editor. It screws up my own HTML formating which I do from a plain text editor ("vim" with color syntax highlighting under linux)! I don't use fancy HTML technqiues, PHP, or Server Side Includes, just simple HTML text formating (how HTML was originally intended to be used). This allows the examples to work with just about any browser. My only concession to JAVA, was to allow Windows XP "Internet Explorer" to display PNG images with transparency.

I also use extra HTML codes for <CODE>...</CODE> blocks, which while not 'standard HTML' is completely ignored by web browsers. These non-standard attributes allows a perl script to extract the actual 'commands' shown on the page, and exectute them to generate the examples. That is just about every example image result you see can be re-generated using the command shown. That script also lets me know when an example 'breaks' (major changes to the resulting image), and this has discovered huge numbers of 'bugs' and changes to IM, that were not expected.

I also prefer the use of small images so as to save documentation space (and disk space), the few images 'built-in' to ImageMagick, generated or drawn test images, and the re-use images created by previous examples in the same section, or which has already added to IM Examples. Basically I try to keep the image set as small and versitile as posible. But I understand that some examples need specific images to demonstrate some specific feature.

These are the four 'image' source directories used within IM Examples... All the images in IM examples start from the images in these directories, from 'built-ins', or fonts.

A required source image is linked from the above into the sub-directory of the example section needing the image. That way when an example "command" is extracted from the "index.html" file, it will find its source images in the same directory, and generates its results in the same directory. Text output files are converted into GIF images for inclusion on the "index.html" page, so users can see the actual output, and not something generated when the example was first written.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
http://www.imagemagick.org/Usage/

User avatar
anthony
Posts: 8867
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: IM Example Contributions (How To)

Post by anthony » 2012-07-05T23:40:16-07:00

catherine79 wrote:I have gone through your topic .I have a question to ask you
can you please explain more about the " don't use fancy HTML technique" ..Not got the WORD "FANCY HTML"
I always enjoy your article . You are awesome anyway.
I mean do not relay on heavy positioning (such as inserted by word processors), Style sheets, and strong use of tables. I write my HTML directly in a plain text editor, with tables used for examples, and the minimal use of formatting. I do not use JAVA or any of its derivatives (with a single concession for IE6 and it's bad PNG transparency handling, which I suppose I can now get rid of now that Microsoft no longer supports IE6). I don't use PHP, though I don't mind the use of PHP.

By doing this the example are generally usable on all web browsers, now and in the furture (just as HTML was originally intended), including command line html browsers like wget, curl, and lynx.

Of course it isn't a 'wiki' or 3rd generation web application, like forums. I am considering migrating IMv7 examples to a wiki, if Cristy wouldn't mind hosting it, but am weary of trolls, griefers and novices destroying the examples made available in this way. It also make it harder to keep the examples organised in a fashion that can be read linearly, as it is now. As I said -- still thinking about it.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
http://www.imagemagick.org/Usage/

Dabrosny
Posts: 111
Joined: 2013-10-02T10:49:39-07:00
Authentication code: 6789
Location: New York, US

Re: IM Example Contributions (How To)

Post by Dabrosny » 2013-10-28T05:44:02-07:00

It would be nice if the examples, and even more so, the main documentation pages like command-line-options.html, were in a wiki. Editing could be limited to logged-in users to minimize vandalism. I've seen a number of small errors that I could have simply fixed (and if I happened to make a mistake someone could revert the edit anyway). Posting, explaining, and clarifying small issues on these pages is way too time-consuming so I don't bother.
-Dabrosny [Using IM7.0.6 or higher, Q16 HDRI x64 native executable, command line, often invoked from cygwin bash/sh (as of Aug. 2017)]

User avatar
anthony
Posts: 8867
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: IM Example Contributions (How To)

Post by anthony » 2013-10-28T17:15:30-07:00

Would you be willing to to take it over, and migrate to a wiki format?
That would be a lot of work, but my life has sort of moved on to other things.
I have been doing this for about 12 years, and I am feeling it.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
http://www.imagemagick.org/Usage/

Dabrosny
Posts: 111
Joined: 2013-10-02T10:49:39-07:00
Authentication code: 6789
Location: New York, US

Re: IM Example Contributions (How To)

Post by Dabrosny » 2013-10-31T13:17:29-07:00

anthony wrote:Would you be willing to to take it over, and migrate to a wiki format?
That would be a lot of work, but my life has sort of moved on to other things.
I'm afraid I can't take that on right now.
anthony wrote:I have been doing this for about 12 years, and I am feeling it.
And neither can you; I understand.
-Dabrosny [Using IM7.0.6 or higher, Q16 HDRI x64 native executable, command line, often invoked from cygwin bash/sh (as of Aug. 2017)]

cloud
Posts: 26
Joined: 2009-06-26T07:09:31-07:00
Authentication code: 8675309
Location: Zürich, Switzerland | Como, Italy

Re: IM Example Contributions (How To)

Post by cloud » 2014-04-03T06:39:00-07:00

I'll pick up the challenge. Will report as soon as I have a working prototype.

~C
IM compilation script and test project: https://github.com/marforic/imagemagick_lib_iphone (always up-to-date)
IM latest iOS binaries: ftp://ftp.imagemagick.org/pub/ImageMagick/iOS/

Post Reply