NisseBosseLasse Posted July 11, 2009 Share Posted July 11, 2009 (edited) Updated 4 Oct 2010 The 4 October update is merely the addition of a stand-alone version of this application, for use on 64-bit Windows. For more information, continue to the bottom of this post. The original plugin hasn't changed for this release. I've decided to remove the stand-alone version to avoid further confusions. Version 0.2.1 Added localization support (current only Swedish) Version 0.2 Small change in the UI (new icon etc.) Changed menu location from TWAIN to Tools Version 0.1 First release My first plugin! Hopefully someone finds it useful. It's still in development (0.2.1), but it should work as expected. Note This plugin currently only works on 32-bit systems. About I wrote this effect to be able to use my "old" CanoScan LiDE 20 scanner from Paint.NET. It uses the EZTwain Classic DLL, and should be compatible with all scanners that are TWAIN-compatible. Files included Twainable.dll - The effect plugin (required) EZTW32.dll - The EZTwain Classic DLL used by this plugin (required) Twainable readme.txt - This file sv-se.fxlang - Swedish localization Installation Place the files Twainable.dll and EZTW32.dll in the Effects folder of your Paint.NET installation folder. (Optional) Placing the sv-se.fxlang file in the Effects folder will give you Swedish translation. This plugin utilizes the plugin translation written by Simon Brown*. The file sv-se.fxlang contains translated entries for this plugin (currently only in Swedish). See Translation below if you want to translate these entries to your tongue. The localization file isn't required by the plugin to function. If not found, it will use English as default. If you want to use it, place it in the same folder as the Twainable.dll file (that is, the Effects-folder). *Note: the plugin translation code can be found in this forum thread: http://forums.getpaint.net/index.php?/topic/18816-plugin-translation-scheme-including-code/ Usage After placing both files in the Effects folder, (re-)start Paint.NET. The plugin can be found under the menu Effects->Tools->Acquire from TWAIN... The main window consists of three buttons: "Select Source..." lets you select which TWAIN-source to use "Acquire to clipboard..." starts the scanner software, and stores the scanned image in the clipboard "Close" closes the window Translation First, read the forum thread at http://forums.getpaint.net/index.php?/topic/18816-plugin-translation-scheme-including-code/ to get a better understanding on the format. The entries that this plugin uses are the following: <LANGCODE>:select source=<YOUR TRANSLATION> <LANGCODE>:acquire=<YOUR TRANSLATION> <LANGCODE>:close=<YOUR TRANSLATION> <LANGCODE>:close window automatically=<YOUR TRANSLATION> ...where <LANGCODE> is the language code of your language (e.g. sv-se for Swedish, de for German, and so on), and <YOUR TRANSLATION> is of course the translation. The file sv-se.fxlang contains several other entries as well, but these aren't used by this plugin. References EZTwain Classic DLL can be found here: http://www.dosadi.com/eztwain1.htm Running on 64-bit systems If you running a 64-bit system you may have come across the error message System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B). This is due to trying to run the plugin on a 64-bit system. I've developed a stand-alone version of the plugin, for all you 64-bit users. It works in the same way, but doesn't required Paint.NET to run (it's a stand-alone, after all). Just download the "Twainable (stand-alone 0.1).zip" archive attached to this post, and read the file "Read me.txt" contained within. Removed as of 8 sep 2011. Twainable.zip Edited September 8, 2011 by NisseBosseLasse Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted July 11, 2009 Share Posted July 11, 2009 I suggest placing it in Effects -> Tools as Effects -> TWAIN only has one item. Quote Link to comment Share on other sites More sharing options...
NisseBosseLasse Posted July 11, 2009 Author Share Posted July 11, 2009 Good call, I'll change that for the next release. Quote Link to comment Share on other sites More sharing options...
NisseBosseLasse Posted July 12, 2009 Author Share Posted July 12, 2009 I'm currently making minor changes for the next release, so I'm eager to hear about improvements and/or experiments with the current version (does it work? ). It's been downloaded 11 times, so I guess someone must've tried it! Quote Link to comment Share on other sites More sharing options...
jwkerley Posted July 13, 2009 Share Posted July 13, 2009 Works for me - using CanoScan N670U. Thanks! Quote Link to comment Share on other sites More sharing options...
NisseBosseLasse Posted July 13, 2009 Author Share Posted July 13, 2009 Works for me - using CanoScan N670U. Thanks! Good to hear! Quote Link to comment Share on other sites More sharing options...
Pyroguy Posted August 22, 2009 Share Posted August 22, 2009 You are my hero. Thank you so much for this plugin. Quote Link to comment Share on other sites More sharing options...
NisseBosseLasse Posted August 23, 2009 Author Share Posted August 23, 2009 You are my hero. Thank you so much for this plugin. Thank you! Good to hear someone else is finding it useful. Quote Link to comment Share on other sites More sharing options...
bjneedle Posted November 19, 2009 Share Posted November 19, 2009 Works nicely with my hp 2610 AIO Quote Link to comment Share on other sites More sharing options...
NisseBosseLasse Posted November 24, 2009 Author Share Posted November 24, 2009 Works nicely with my hp 2610 AIO Wonderful! Quote Link to comment Share on other sites More sharing options...
Nordmann Posted December 12, 2009 Share Posted December 12, 2009 Doesnt work in Win7 x64: Datei: C:\Program Files\Paint.NET\Effects\Twainable.dll Effektname: Twainable.EffectPlugin Vollständige Fehlermeldung: System.BadImageFormatException: Es wurde versucht, eine Datei mit einem falschen Format zu laden. (Ausnahme von HRESULT: 0x8007000B) bei Dosadi.EZTwain.EZTwain.IsAvailable() bei Twainable.EffectPluginConfigDialog.CheckAvailableTwain() bei Twainable.EffectPlugin.CreateConfigDialog() bei PaintDotNet.Menus.EffectMenuBase.RunEffectImpl(Type effectType) in D:\src\pdn\paintdotnet\src\PaintDotNet\Menus\EffectMenuBase.cs:Zeile 708. Translation: Complete Errormessage: System.BadImageFormatException: Tried to load a File with a wrong Format (Exception from HRESULT: 0x8007000B) Although works fine on my XP x86 Laptop with same TWAIN 8) (Twain via Network for Lexmark X543) Quote greetz, [color=#000080][b]Nordmann[/b][/color] Link to comment Share on other sites More sharing options...
yorickk Posted December 14, 2009 Share Posted December 14, 2009 I am trying to use Paint.NET 3.5 Build 3.51.3610.35022 instead of MS Photodraw. I have installed the Twainable plug as directed to enable me to use my EPSON STYLUS PHOTO RX630. When I scan to the clipboard the EpsonScan page pops up but in Configuration on the Clor tab with ICM dotted I cannot find jpegs in the list (this what I have been using when I use EpsonScan externally to Scan old photos or film). I have tried all the options on the Target drop down. However in all cases when I click on the clipboard icon I am getting an error message "Image in the clipboard cannot be recognised -Try recopying etc". Quote Link to comment Share on other sites More sharing options...
yorickk Posted December 14, 2009 Share Posted December 14, 2009 Sorry folks. I found that I had not tried one of the Color settings in the ICM boxes. If I use the SMPTE-C it works Quote Link to comment Share on other sites More sharing options...
yorickk Posted December 14, 2009 Share Posted December 14, 2009 Me again folks. Seems it does not like EpsonScan 600bpi setting but 400bpi is ok. File size limit??? Quote Link to comment Share on other sites More sharing options...
ibigpapa Posted December 31, 2009 Share Posted December 31, 2009 I also get the error when running windows 7 x64 File: D:\Program Files\Paint.NET\Effects\Twainable.dll Effect Name: Twainable.EffectPlugin Full error message: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at Dosadi.EZTwain.EZTwain.IsAvailable() at Twainable.EffectPluginConfigDialog.CheckAvailableTwain() at Twainable.EffectPlugin.CreateConfigDialog() at PaintDotNet.Menus.EffectMenuBase.RunEffectImpl(Type effectType) in D:\src\pdn\paintdotnet\src\PaintDotNet\Menus\EffectMenuBase.cs:line 708 Quote Link to comment Share on other sites More sharing options...
NisseBosseLasse Posted January 13, 2010 Author Share Posted January 13, 2010 Hello again everybody, sorry for the absence. This plugin is merely a wrapper around the EZTwain Classic-dll (not written by me, but Dosadi). According to their site, their DLL only supports 32-bit Windows. So sorry, only 32-bit. EDIT: this also explains the error message "System.BadImageFormatException: Tried to load a File with a wrong Format (Exception from HRESULT: 0x8007000B)" - this is due to loading the 32-bit DLL in a 64-bit environment. Quote Link to comment Share on other sites More sharing options...
zwiebelchen Posted June 22, 2010 Share Posted June 22, 2010 Hello to everybody, I am a complete newcomer to this forum (actually to all techical forums) and tripped over this thread, since I have the same problem: my paint.net does not recognize/show my scanner canonScan Lide 20 when trying to acquire data from a scanner. May you please be so kind and explain to me, where and how I can get the plugin you are talking about in this thread? What else is necessary to get my scanner running (aktually it works but does not cooperate with paint.net )? Thank you very much, sorry about these very basic questions little onion (zwiebelchen in German) Quote Link to comment Share on other sites More sharing options...
Sarkut Posted June 22, 2010 Share Posted June 22, 2010 (edited) The download link for this plugin is at the very bottom of the first post in this thread. Click where it says, Twainable.zip ----------------------------------------- Inside the zip is a readme.txt that explains what to do. Edited June 22, 2010 by Sarkut Quote Link to comment Share on other sites More sharing options...
zwiebelchen Posted June 22, 2010 Share Posted June 22, 2010 Dear Sarkut, get a big hug from this unknown German lady: with your simple and clear instructions I got the scanner running within one minute! Thanks a lot little onion Quote Link to comment Share on other sites More sharing options...
NisseBosseLasse Posted July 6, 2010 Author Share Posted July 6, 2010 zwiebelchen: nice to hear it works for you! Quote Link to comment Share on other sites More sharing options...
Raalpha9 Posted August 12, 2010 Share Posted August 12, 2010 Works perfectly with Windows XP and Cannon CanoScan 3000/3000f 8.3. Thank you for your willingness to share your talents. Cheers R Quote Link to comment Share on other sites More sharing options...
NisseBosseLasse Posted October 4, 2010 Author Share Posted October 4, 2010 Raalpha9: good to hear! I've updated the original post about the new stand-alone version of this plugin. It should resolve the issue when trying to run this plugin on a 64-bit system (the infamous System.BadImageFormatException error message). Quote Link to comment Share on other sites More sharing options...
goyuix Posted December 6, 2010 Share Posted December 6, 2010 First off: Thank You! Thank You! Thank You! I recently needed to dust off my old Canon LiDE 50 scanner and run a document through it. After doing the driver song and dance on Windows 7, I had the scanner working but only through the TWAIN interface... any of this sound familiar? So yes, thank you very much! I did want to provide some feedback as well: 1) Repeating the "effect" doesn't seem to do anything other than pull the data in from the clipboard again. 2) I would really like to have an option to "scan to new image" or "scan to new layer" to skip the pasting step. This could also be used to keep mounds of data off the clipboard. 3) While I don't personally care, I kind of like the older option of having TWAIN appear under the Acquire menu better than an effect. Even though this is an "effect". Just wanted to throw my hat in the ring on this one... Any chance you would consider opening the source and posting it on BitBucket, GitHub or CodePlex? Quote Link to comment Share on other sites More sharing options...
NisseBosseLasse Posted December 18, 2010 Author Share Posted December 18, 2010 goyuix: nice to hear it's working for you! Repeating the "effect" doesn't seem to do anything other than pull the data in from the clipboard again. Probably true. I've never used the plugin in that way and therefore never actually thought of it. I'll look into it! I would really like to have an option to "scan to new image" or "scan to new layer" to skip the pasting step. This could also be used to keep mounds of data off the clipboard. Good suggestions - maybe for the next release! The Paint.NET API isn't something I quite master (yet?), so I'm unsure if effects are able/allowed to tamper with creating new images, or new layers. But it would be a good feature, nonetheless. While I don't personally care, I kind of like the older option of having TWAIN appear under the Acquire menu better than an effect. Even though this is an "effect". Just wanted to throw my hat in the ring on this one... As you probably already figured out, this isn't something I as an effect developer can change. Any chance you would consider opening the source and posting it on BitBucket, GitHub or CodePlex? Absolutely, for the next release. I've been working on a fresh code base that doesn't use the Dosadi EZTwain-DLL, and when it's mature enough I'll probably upload it somewhere (Google Code?). Quote Link to comment Share on other sites More sharing options...
azrael5 Posted March 16, 2011 Share Posted March 16, 2011 (edited) Dear entusiast i have used your file on mustek scanner a3 usb but after acquiring the image, it appears entirely white... how is it possible? Thanks for every help you may give to me. and compliment for your work. Morris. Edited March 16, 2011 by azrael5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.