Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th March 2008, 17:24   #1  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
ImageMagick Reader / Writer for AviSynth v1.60

This plugin consists of two filters: ImmaRead and ImmaWrite. The former reads images and the latter writes images to your hard drive.

ImmaRead supports the following formats:

* bmp, bmp3/4, dds, dpx, gif, jng, jpg, jp2, mng, pam, pbm, pcx, pgm, png, pnm, ppm, psd, svg (partial), tga, tiff, webp and wmf;
* formats with an alpha channel: gif, jng, png and tiff;
* gif and mng animations, multipage ppm and tiff, multilayer psd;
* 8 bit grayscale images (any alpha channel that is present is dropped);
* vector images: eps, pdf and ps (you need to install GhostScript, for example 8.64 (gs864w32.exe) or more recent; might be convienient to install GhostView (gsv50w32.exe) too although that's not necessary);
* raw camera support (3FR, CR2, DCR, DNG, ERF, MEF, MRW, NEF, ORF, PEF, RAF, SR2 and X3F) (you need to copy the patched version of dcraw.exe which is included in this package in a folder, say C:\Program Files (x86)\dcraw, and add the folder as a PATH system variable in the environmental variables).

Note that raw files are not supported by ImmaRead, since they can be opened by the plugin RawSource.

ImmaWrite supports the following formats:

* bmp, bmp3/4, dds, dpx, gif, jng, jpg, jp2, mng, pam, pbm, pcx, pgm, png, pnm, ppm, psd (only one layer?), svg (partial), tga, tiff, webp and wmf;
* formats with an alpha channel: gif, jng, png and tiff;
* gif, mng and psd animations, multipage ppm and tiff;
* 8 bit grayscale (with or without an alpha channel) images;
* raw images: either RGB or YCbCr depending on the input (for YCbCr with the following order of the planes: Y,U,V);
* YUV4MPEG (y4m): 4:2:2, 4:4:4, 4:2:2, 4:2:0mpeg2, 4:1:1 and mono are supported as planar formats with the following order of the planes: Y,U,V [see y4m: http://wiki.multimedia.cx/index.php?title=YUV4MPEG2; http://linux.die.net/man/5/yuv4mpeg];
* vector images: eps/eps2/eps3, pdf and ps/ps2/ps3.

Note that ImmaWrite doesn't support svg, wmf, raw digital photos or multi-layer psd.

Grayscale images are opened as Y8. RGB images are opened as RGB32 (when there is an alpha channel present) or as RGB24 (if there is no alpha channel present). Other formats (such as CMYK) are converted to RGB.

You need the ImageMagick dll's in order to be able to use this plugin. They should be copied to some folder (any folder will do). You need to set the MAGICK_HOME variable to the location of ImageMagick dll's (under Settings -> System -> Advanced -> Environment Variables -> Add MAGICK_HOME as a user variable), or you need to provide it using the magick_home argument. Thus for example, magick_home = "C:\\WINNT\\system32".

Changelog in v1.60:

* updated to AVISYNTH_INTERFACE_VERSION = 6 (so the plugin requires AviSynth v2.60).
* updated ImageMagick libraries to v7.0.2-10 (ported code to MagickCore API 7.0).
* ImmaRead: grayscale images are opened as Y8, non-grayscale images as RGB24 (or RGB32 if there is an alpha channel present).
* ImmaWrite: added dithering methods "Riemersma" and "FloydSteinberg".
* ImmaWrite: added the new 2.6 colorformats for raw/y4m.
* ImmaWrite: the color option is changed to color_max.
* ImmaWrite: added quality and sampling_factor options for jpeg.
* ImmaWrite: added the compression option.

Enjoy ;-)

download:
* plugin: http://www.wilbertdijkhof.com/Immaavs_v160.zip
* ImageMagick dll's: http://www.wilbertdijkhof.com/ImageMagick-7.0.2_dll.zip (copy the dll's and xml files to your 32-bit system folder)

Last edited by Wilbert; 18th December 2016 at 01:11.
Wilbert is offline   Reply With Quote
Old 17th March 2008, 03:40   #2  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
So this is, in it's current form, just like ImageSource() but on steroids!
If i ever wanted to update this Plugin with a new version of imagemagick how easy would that be?
In the future, would it be possible to use the imagemagick library as another filter. So i could use imagemagick's image processing in my script? would i ever want to do this?

I downloaded the zip and extracted everything. I tried running this in the Release folder but it says 'LoadPlugin: unable to load "immaavs.dll" '
Code:
LoadPlugin("immaavs.dll")
Immaread("goldpetals.gif")
All 28 files from the zip are in the Release folder including the above 2 files. Timestamp of the dll is 3/16/2008 2:49PM


Thanks for your time!

ps u might want to change the title in the htm doc to something other then ColorMatrix

Last edited by mikeytown2; 17th March 2008 at 03:46.
mikeytown2 is offline   Reply With Quote
Old 17th March 2008, 22:23   #3  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
Quote:
If i ever wanted to update this Plugin with a new version of imagemagick how easy would that be?
It took me ages to get it working on my PC. But it still has to work on yours using the dll's alone

You need to recompile ImageMagick (all libs and dlls), and after that you need to recompile the plugin (linking against some of the libs).

Quote:
I downloaded the zip and extracted everything. I tried running this in the Release folder but it says 'LoadPlugin: unable to load "immaavs.dll" '
Crap. I guess copying all dlls to your system folder doesn't help?

Could you try the following command-line utility:

http://www.geocities.com/wilbertdijkhof/core2.zip

It converts format X into format Y.

1) copy all dlls in your system folder.
2) open a dos prompt, go to the folder you put core2.exe in and type: core2.exe goldpetals.jpg test.bmp

It should convert your jpg to test.bmp. Does that work?
Wilbert is offline   Reply With Quote
Old 17th March 2008, 22:52   #4  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
Here are some screen shots. They might help



Edit
Looks like the zip doesn't have CORE_RL_xlib.dll in it

Last edited by mikeytown2; 17th March 2008 at 23:02.
mikeytown2 is offline   Reply With Quote
Old 17th March 2008, 23:04   #5  |  Link
McCauley
Registered User
 
Join Date: Nov 2006
Posts: 83
Hi Wilbert,

thanks for this plugin.
Is there a chance that ImageMagick will support the DNG format in the near future? That would be great, because one could use a RAW converter without Photoshop to convert DNG to a compatible format. That would be a tremendously useful feature for Stop Motion movies.

Regards
McCauley
McCauley is offline   Reply With Quote
Old 17th March 2008, 23:49   #6  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
Quote:
Edit
Looks like the zip doesn't have CORE_RL_xlib.dll in it
Here's a package with some more dlls:

http://www.geocities.com/wilbertdijkhof/core2.zip

Could you try core2.exe again?

Quote:
Is there a chance that ImageMagick will support the DNG format in the near future? That would be great, because one could use a RAW converter without Photoshop to convert DNG to a compatible format. That would be a tremendously useful feature for Stop Motion movies.
Perhaps. The list with supported formats http://www.imagemagick.org/script/formats.php says the following about it:

"Requires an explicit image format otherwise the image is interpreted as a TIFF image (e.g. dng:image.dng)."

I'm not sure what it means. Does it work in E-Male's own plugin?
Wilbert is offline   Reply With Quote
Old 18th March 2008, 01:05   #7  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
2 More screen shots



If we can't figure this out in a couple of days i could let u mstsc into my box. I use it on the go.
http://www.kood.org/terminal-server-patch/


BTW time stamp of core2.exe is on the 9th with this latest zip.
And there are only 2 files in the zip

Last edited by mikeytown2; 18th March 2008 at 01:08.
mikeytown2 is offline   Reply With Quote
Old 18th March 2008, 05:46   #8  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
Wilbert: core_rl_magick_.dll seems to have dependencies on:
  • CORE_RL_BZLIB_.DLL
  • CORE_RL_LCMS_.DLL
  • CORE_RL_XLIB_.DLL
  • CORE_RL_ZLIB_.DLL
which all seem to be missing.
squid_80 is offline   Reply With Quote
Old 18th March 2008, 11:33   #9  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 210
A possibility to do some image editing would be very nice. ;-)

For example, resizing without gamma errors.

1. Convert to 16 bit format
2. Set gamma = 1/2.2
3. Resize
4. Set gamma = 2.2
5. Convert to 8 bit format
Archimedes is offline   Reply With Quote
Old 18th March 2008, 20:25   #10  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
@mikeytown2,

Sorry, i put up the wrong zip file. Here's the correct one:

http://www.geocities.com/wilbertdijkhof/core2_dll.zip

These are precisely the ones that squid_80 mentioned. Could you try it again?
Wilbert is offline   Reply With Quote
Old 18th March 2008, 20:45   #11  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
Quote:
Originally Posted by Wilbert View Post
@mikeytown2,

Sorry, i put up the wrong zip file. Here's the correct one:

http://www.geocities.com/wilbertdijkhof/core2_dll.zip

These are precisely the ones that squid_80 mentioned. Could you try it again?
It works, the resulting bmp file looks good.
mikeytown2 is offline   Reply With Quote
Old 18th March 2008, 21:26   #12  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
Quote:
It works, the resulting bmp file looks good.
Great! What about the plugin? Can you get that to work?
Wilbert is offline   Reply With Quote
Old 20th March 2008, 04:39   #13  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
It works when i have these 32 files in the same dir

Last edited by mikeytown2; 20th March 2008 at 04:42.
mikeytown2 is offline   Reply With Quote
Old 20th March 2008, 22:11   #14  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
Great! Thanks for the confirmation!
Wilbert is offline   Reply With Quote
Old 23rd March 2008, 18:03   #15  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
Updated to v1.2 and this time all necessary dll's are included.

changelog:

* added several new formats (like tga, jng, mng, pcx and wmf);
* support for animated formats where the images have different sizes.
Wilbert is offline   Reply With Quote
Old 23rd March 2008, 18:05   #16  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
@McCauley,
Quote:
Is there a chance that ImageMagick will support the DNG format in the near future? That would be great, because one could use a RAW converter without Photoshop to convert DNG to a compatible format. That would be a tremendously useful feature for Stop Motion movies.
I get strange error messages when trying to open some dng files i found on the internet. I will ask the ImageMagick devs what the status of dng support is.
Wilbert is offline   Reply With Quote
Old 23rd March 2008, 20:37   #17  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
@McCauley
If you are looking for any alt to photoshop's RAW converter, try http://www.xnview.com/ it's been helpful to me multiple times; although they don't mention DNG on their website. Wikipedia says that DNG http://en.wikipedia.org/wiki/Digital...file_format%29 is supported in ImageMagick. http://www.imagemagick.org/discourse...pic.php?t=8113
http://www.adobe.com/products/dng/supporters.html
mikeytown2 is offline   Reply With Quote
Old 26th March 2008, 23:03   #18  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
Quote:
Originally Posted by Wilbert View Post
The ImageMagick libraries are updated to v6.3.8-11
Quick question, which version is this?
v6.3.8-1 or v6.3.9-0
http://www.imagemagick.org/script/changelog.php
mikeytown2 is offline   Reply With Quote
Old 26th March 2008, 23:15   #19  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
Quote:
Quick question, which version is this?
v6.3.8-1 or v6.3.9-0
http://www.imagemagick.org/script/changelog.php
It's not on the list I guess it's from the 18/19th of February. I will update them again next time!
Wilbert is offline   Reply With Quote
Old 2nd April 2008, 22:28   #20  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
I put a new version up before i start with write support!

Changelog:

* updated ImageMagick library to v6.4.0;
* added dds;
* added support for raw digital photos [see docs for its usage].
Wilbert is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.