Page 1 of 1

IM Example Contributions (How To)

Posted: 2012-03-23T00:37:54-07:00
by anthony
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.

Re: IM Example Contributions (How To)

Posted: 2012-07-05T23:40:16-07:00
by anthony
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.

Re: IM Example Contributions (How To)

Posted: 2013-10-28T05:44:02-07:00
by Dabrosny
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.

Re: IM Example Contributions (How To)

Posted: 2013-10-28T17:15:30-07:00
by anthony
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.

Re: IM Example Contributions (How To)

Posted: 2013-10-31T13:17:29-07:00
by Dabrosny
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.

Re: IM Example Contributions (How To)

Posted: 2014-04-03T06:39:00-07:00
by cloud
I'll pick up the challenge. Will report as soon as I have a working prototype.

~C

Re: IM Example Contributions (How To)

Posted: 2018-12-25T01:41:10-07:00
by whugemann
What is the future of Anthony's example section of the IM Website?
Some years ago, I contributed to it, providing pure HTML code. I understand that this workflow will not work anymore. I think that especially the Windows section could need a revision and extension in regard to Powershell, VBA, Autohotkey and .NET.
As has been said, this would be easier (and with a lower threshold for the user), if one could deliver enhancements bit by bit. I would also encourage a Wiki, especially MediaWiki, which I know quite well. (I'm running two of my own.)

As I understood, Anthony's Website runs the IM code an produces the examples on-the-fly, thus ensuring that thie code is truly functional (?). I guess this would be hard to implement in a MediaWiki, as it would require a sophisticated AddOn. But possibly, we could just start to rebuild the Usage section as a simply Mediawiki and I would transform my pages as a try?

Re: IM Example Contributions (How To)

Posted: 2018-12-25T06:59:04-07:00
by magick
We have had a few folks in the past that have offered to take over Anthony's usage pages but nothing has been delivered yet. We assume the task is quite challenging and those that have started the effort have lost interest once they realize the time commitment. Any casual observer can see the value of the Usage pages beyond just utilizing ImageMagick itself, it includes valuable knowledge on digital image processing, and is another set of unit tests to ensure ImageMagick is bug free. You or another ImageMagick user or users are encouraged to port these pages to a Mediawiki or other delivery solution. The ImageMagick development team is too consumed with support to be overly helpful but we will help where we can.

Re: IM Example Contributions (How To)

Posted: 2018-12-25T11:17:00-07:00
by whugemann
Well, I'm not offering to transfer all pages to a MediaWiki, but I would offer to set up a MediaWiki with a basic structure and transfer my own pages as a start. Doing so, I would rather split up the Windows page into several pages, as all Usage pages are way too long for Web pages, I guess.

After that, one could split up the entire task, if this approach has proven to be useful. I am not thinking of a genuine wiki, giving anyone write access, as this only provokes vandalism. I am thinking of MediaWiki more as a simple CMS with a flat user hierarchy (and one I know how to handle).

If the development team considers this approach useful: How could we get started? I could possibly set up a test wiki on one of my own sites that we could later transfer to imagemagick.org. And, sorry, I would not take responsibility for the wiki management forever. I would get it going an help to handle the first struggles until it runs smoothly.

As an alternative, could you make a suggestion what to do about my Windows section of the Usage pages? How could I possibly update it? I think (and have always thought) that spreading such information over several sites makes no sense. The Usage pages are too essential, they should be hosted at imagemagick.org.