Free Image Class Library (DLL) Very Useful :)  
Author Message
Dilmer





PostPosted: Visual C# General, Free Image Class Library (DLL) Very Useful :) Top

Hi guys,

I've just finished an Image class library that you guys can use for free. Is a dll file very simple but useful. I'm using GDI+ to manipulate images in any kind of format. You can also do image rotation, zoom in & out, opening multi page image is also supported, and annotation.

All the methods a self explanatory the only thing you need to know is that you should put an pictureBox control inside of a panel and set auto scroll to true so that you get scrolling capabilities and other than that just instantiate the class library that I'm providing you passing the Image Name and a reference to the picture box and call the methods using the variable name.

Example

ImageClass myImageControl = new ImageClass("test.tif", pictureBox1);

myImageControl.nextPage();

myImageControl.zoomIn();

anotateImage("My Annotation", 10, 10, 20, Color.Black); //Annotated image is place in c:\\

Please try it out let me know if you have any questions!

Download

Thank you

Dilmer Valecillos

Software Developer



Visual C#17  
 
 
Helpneeded1





PostPosted: Visual C# General, Free Image Class Library (DLL) Very Useful :) Top

Hello

I tried your image class library, but it crashes when I give an image of resoluton 300x300 dpi, size=9033 x 17848 Pixels. Not only that, the class does not contain any method called nextPage, there is a nextImage but no nextPage. The following is the stack trace of the error:

************** Exception Text **************
System.InvalidOperationException: BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress.
at System.Drawing.BufferedGraphicsContext.Dispose(Boolean disposing)
at System.Drawing.BufferedGraphicsContext.Dispose()
at System.Drawing.BufferedGraphicsContext.AllocBufferInTempManager(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
at System.Drawing.BufferedGraphicsContext.Allocate(IntPtr targetDC, Rectangle targetRectangle)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ImageView
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/tests/ImageView/ImageView/bin/Release/ImageView.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
ImageClass
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/tests/ImageView/ImageView/bin/Release/ImageClass.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT de**** registered on the computer
rather than be handled by this dialog box.


 
 
Dilmer





PostPosted: Visual C# General, Free Image Class Library (DLL) Very Useful :) Top

Could you please post the piece of code where you're having the problem
 
 
Genaro Sanchez





PostPosted: Visual C# General, Free Image Class Library (DLL) Very Useful :) Top

Hi, where can I download the DLL The link is missing.

Thanks a lot.