Important alert: (current site time 7/16/2013 3:02:59 AM EDT)
 

winzip icon

Digital image processing

Email
Submitted on: 12/5/2002 3:58:03 AM
By: Ark 
Level: Advanced
User Rating: By 55 Users
Compatibility: VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 44960
(About the author)
 
     VB PhotoShop clone. Various image effects - rotation, flip, fade, color manipulation, fish-eye,swirle etc plus various filters - soften/sharpen/custom etc. A lot of undocumented staff including using MSOffice graphic convertion filters, pure VB calling dll functions by its pointers, assembly language inside VB and much more!

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 14 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
12/5/2002 8:18:49 PMArk

Hello guys!
Thanks for voting! Some notes:
1. Running in IDE this code is extremelly slow, but when compiled with Fast optimization and checking all advanced tabs it's almost as fast as commercial/C samples.
2. Code was tested on w98/IE5.0/MSOffice_97. Since I used a lot of undocumented staff, some functionality may be lost on other versions, especially 2000/XP. It was reported that MS Office Export filters doesn't work on w2000/MSOffice2000 - seems sEatStackSpace trick doesn't work. Now I'm working on fixing this prb.

Regards
Ark
(If this comment was disrespectful, please report it.)

 
12/6/2002 12:36:26 AM

I gave you a 5, probably more so for the very useful tid bits that you didn't mention. Your tweaks on the Common Dialogs were exceptional and I wish I were the one that figured how to use the shared graphic file filters. For me this was probably one of the more useful pieces of code I have got off of here. Who cares about the bugs here and there. Good Work and Thanks!
(If this comment was disrespectful, please report it.)

 
12/6/2002 12:44:49 AM

FYI, there are many more filters available in XP, that your code picks up. Importing works well, but haven't had much luck with exporting. When I play with it more I'll give you better info. I did find you can copy some of filters from XP to Me, make the mods to the registry and what I have tried works fine.
(If this comment was disrespectful, please report it.)

 
12/6/2002 1:21:08 AMArk

Hello sblosser
Thank you for interesting this code. I'll be glad give you all credits if you'll find a way to use Export filters in 2000/XP. Unfortunatelly, this staff is totally undocumented - I couldn't find anything over the NET. Most recent doc about Import filters dated by April 1992(!) - you can find it in Dr. Dobbs archive. Though all declarations there are 16 bit, I could replace them with 32bit equivalents and found almost all staff by experiments.
As for Common dialog extencion - I simply forgot to mentioned it :) Let say, this is 'much more' :)
For those who interesting - there is a trick in this sample showing how to subclass common dialog and use additional VB Form as template to extend ComDlg functionality (preview, additional controls etc).

Thanks and regards
Arkadiy Olovyannikov
(If this comment was disrespectful, please report it.)

 
12/6/2002 8:07:06 PMArk

Thanks everybody who voted me!
(If this comment was disrespectful, please report it.)

 
12/7/2002 4:42:20 AM

hi there!
ark, look here for clsASMpic 1.0, realtime image processing of even large pictures in VB using inline assembly:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=40386&l ngWId=1
...also
watch out for code by robert rayment, really fantastic stuff!
gx, buggy
(If this comment was disrespectful, please report it.)

 
12/8/2002 6:57:40 PMArk

Hello buggy!
Your class is really nice and gave it 5 globes. But my goal was a bit different - I want to show pure VB image processing (though I tried make it as fast as possible) with easy to understand algorithms. I also use inline assembly, not for speed but for "impossible" (as MS claimed) task - calling function by pointer.
BTW, I have a "clone" of my CallApiByPointer/Name - CallApiFromArray which any dll as byte array and allow call any function by it's offset. If you're interesting, you may contact me at ark@msun.ru

Regards
Ark

PS. Many thanks to all who voted me!
(If this comment was disrespectful, please report it.)

 
12/11/2002 1:47:30 PMVlad Vissoultchev

Arkadiy, i was about to report that this code is "borrowed" from RealVBCode but then YOU are the original author :-)) Nice one! Especially the work on the Aldus imp/exp filters! Btw, do you think Page Maker filters will work with your framework?

</wqw>
(If this comment was disrespectful, please report it.)

 
12/13/2002 2:16:48 AMArk

Hello Vlad. Thanks for responce and voting. I think you mean "FreeVBCode", not "RealVBCode" (though I won't suprise if you found my samples anywhere else - they spread over the NET withou my permission :)). I've posted it twice to allow more ppl learn low-level image processing with VB.
As for Page Maker filters - here is a list of filters I've tested:

'MS Office (all works fine)
BMPImp32,CDRImp32(Corel Draw version ~6 or so), CGMImp32, DRWImp32,DXFImp32, EMFImp32, EPSImp32, FPX32, GIFImp32, HPGLIm32, JPEGIm32, PCDImp32, PCXImp32, PICTIm32, PNG32, TGAImp32, TIFFIm32, WMFImp32, WPGImp32
'Paint Shop Pro (all works fine)
CDR32, CMX32, DRW32, DXF32, GEM32, HPGL32, WPG32
'Corel Draw (v.9)
'All seems don't work correctly

Assuming all above, seems this technique shouldv work with PM versions 2-5.

Regards
Ark
(If this comment was disrespectful, please report it.)

 
12/16/2002 10:34:06 PMluke20au

EXCELLENT!, but there is a few errors...

(If this comment was disrespectful, please report it.)

 
12/16/2002 11:04:43 PMArk

Hello luke
Please, comment which errors did you find?
(If this comment was disrespectful, please report it.)

 
12/18/2002 8:40:51 AM{ pHroZeN GeeK }

u did a great job ark... this code should be on top of this months list..
(If this comment was disrespectful, please report it.)

 
12/20/2002 8:23:57 PMChris Seelbach

An interesting application, and well presented. :)
(If this comment was disrespectful, please report it.)

 
3/5/2003 12:37:09 AMTanner Helland

Great work, Ark. The MSOffice interfacing is very clever and well-written. Hats off too, for doing it without any good documentation to refer to :) Those MSN articles can be pretty messy...
(If this comment was disrespectful, please report it.)

 
3/7/2003 2:39:17 PMMichele_Garneri

Good tool.
but dont save images!!
Because??
(If this comment was disrespectful, please report it.)

 
4/15/2003 8:34:07 AMArk

Hello All!
Thanks for supporting!
Michele, probably it doesn't save images because of using MSOffice filters for saving. Just switch off those filters and save as bmp.

Regards
Ark
(If this comment was disrespectful, please report it.)

 
9/7/2003 9:13:08 AMNorm Cook

Nice work, 5 globes. One error: nMax is allowed to exceed the ProgressBar's Max value. Easy to fix, but something's wrong in the class that raises the event.
(If this comment was disrespectful, please report it.)

 
9/7/2003 10:21:03 AM3K Tech

Good job! I'm currently making image processing functions in C++. I've also been thinking of changing it to VB. Your code shows me you can have efficient code in VB. Thanks!
(If this comment was disrespectful, please report it.)

 
9/7/2003 2:25:26 PMPietro ing. Cecchi

"It was reported that MS Office Export filters doesn't work on w2000/MSOffice2000 - seems sEatStackSpace trick doesn't
work. Now I'm working on fixing this
prb."

I'm waiting for it... :)

In the meantime, 5 globes are mandatory!
(If this comment was disrespectful, please report it.)

 
9/8/2003 9:51:17 PMPsyc

Nice code... but could you try to post a project which focuses mainly on BMP to JPEG conversion? I'm sure it'll be a hit, considering your code's small size... :D
(If this comment was disrespectful, please report it.)

 
9/17/2003 2:23:42 PMChristopher Marsden

Great code but would you consider adding an option to centre the image in the window, also a shrink image to fit window would be a nice.
(If this comment was disrespectful, please report it.)

 
4/27/2004 9:50:39 AM

Dear Its Very Nice and useful code.It helps me a lot in imaging.Thanks A lot for it.Dear do you know How can we add multi page tiff file support in it?

Thanks
Osman
(If this comment was disrespectful, please report it.)

 
5/16/2004 11:35:56 PMKevin Ritch

Good stuff!
Thanks for posting.
Kevin Ritch
(If this comment was disrespectful, please report it.)

 
10/1/2004 4:27:06 AM

I havn't downloaded the code yet, however will do shortly as I am doing the manipulation of digital images as a final year project at uni. Ark, do you think you could give me further explanation of code if required? Also, as part of my project do you think I could perhaps evaluate your product compared to commercial products such as photoshop?

Regards.
(If this comment was disrespectful, please report it.)

 
6/16/2005 3:13:22 AMSASWeb

I can't save into other format like JPG etc. Can you help me?
(If this comment was disrespectful, please report it.)

 
2/8/2007 11:04:27 PMmanoj pandya

it is really a wonderful job. good effort!. Kindly provide the image suppport for tiff/ geotiff imagery. the structure can be found from adobe's site or u can mail me.
thanks,

From,
Manoj Pandya,
India
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.