for sure you will never be able to reach the quality of PhotoShop - they have their own algorithms, and I have my doubts they will release them as product.
So if you need PhotoShop quality you need to see if you can automate the use in some manner.
But there is another excellent image manipulation tool from the Unix/Linux world: the GD lib.
A few years ago I have found a port for Windows and built both a VO library and a sample.
You can find it here: riedmann.it/download/GD_Demo.zip
the FabPaint library is using another free image manipulation library: the PaintLib.
The GD library is used by many webservers and normally works well.
There is another graphics library in the Unix/Linux world: GraphicsMagick www.graphicsmagick.org/INSTALL-windows.html
used for example by Typo3.
GraphicsMagic once installed needs to be called by a command line, so it could be another possibility, but again I don't think it will reach the PhotoShop quality.
your GD_Demo saves the image in ConvertImage:CreateButton with 200 dpi, but I don't see where the dpi is set:
gdImageCopyResampled( strResize, strImage, 0, 0, 0, 0, oDCWidth:Value, oDCHeight:Value, strImage.sx, strImage.sy )
Is it possible to reduce dpi to 72dpi?
dpi is relative, you can set the factor using the parameters.
P.S. I have to explain to graphics people all the time that an image has a size but no dpi, as dpi is effectively a display issue. If you know the size of the image on the screen or the printer, you can calculate how many pixels of with or height do you need - based on the dpi of the output device
I have no doubts ImageMagick works better - it is the much larger library, and it is also the preferred choice in the Typo3 CMS.
But with the resizing factors you gave me ( 6300 x 9000 to 287 x 404 ) I don't think these open source libraries will reach the quality of a professional package like Adobe PhotoShop - Adobe has invested much more money and time in their algorithms (to be honest, they have many, many times the resources an opensource project can have).
if the IM is not accepted, you might try with RawTherapee. Yes, a "Raw" converter, but with a lot of possibilities - and free. Has a commandline interface... Runs on Windows, Linux and Macos. Win install is straightforwarde. Made a quick try resizing one of my jpgs and to my non-professionial eye the result looks good.
No, it will only resize the image. First, try the attached library for sizing the image and if that's meets your expectation, then If you want to crop the image via mouse, then I guess I can add it based on some code from stackoverflow. This will be purely a .NET form callable from VO. The issue with this you won't be able to customize the form unless you know c# and have the source code of the lib which I will make available. If so, let me know I will write it in a few days; hopefully it will work as expected.
thank you for your offer, but I already have a running implementation with ImageMagick and so you don't have to do the work (unless you need it too)! My App does the following with FabPaintLib:
- Open image
- Manipulate image (rotation, contrast, brightness, intensity, gray, invert) and much more
- Zoom in/out
- set and move cutout
- crop cutout
And here comes ImageMagick into play:
- I transfer the FabPaintLib coordinates into ImageMagick needs
- I start a commandline script which crops the cutout, resamples it to 72 dpi, resizes it to 283x397 and saves it
Another need ist to resample and resize full images to 283x397, here no cutout is needed. In both cases the quality of the result is important. ImageMagick brings a much better quality to output image than FabPaintLib which I used before for resampling and resizeing.
If your DLL could do this instead of ImageMagick it would be a benefit, ImageMagick needs an installation of 85MB, and the job is startet via commandline with no return code.
Well, for now try the attached DLL in the previous post for image sizing; I thought that was your original requirement. It's only a few KB.
Actually, I will do the crop feature as an exercise later. It may come in handy for me some day.
Note: please see the included readme.txt for DLL registration.
this is not really a surprise for me.... had expected something like that.
Does anyone know how I can use ImageMagick DLL with VO 2.8 and which files do I need or do I have to install full IM?
AFAIK you have to do a full install,and I would stick with the commandline call. Since there is no binding for VO, you have to study and to adapt the C API. I don't think anyone has done that already...
But it seems you like the hard way.
No I don't like and the user doesn't pay the hard way! If I have to install full prog and there's no easy way with one or a few DLLs I can use within VO, I do it with command line!
Thank you, Franz