J. Baker wrote:Hey WB, I hope you're making some good money with your programming skills.

I must be doing something wrong there

; learned last year that an iPhone app in the app store is not the way
As for the filters, try for yourself if you wish
The lib :
http://www.w73.nl/pb/libPBMX.zip
I combined several things I did in one lib to keep things together a bit, everything starting with MX.
The image related functions are
Code: Select all
MX_Release (object) - Release an object.
Height = MXImage_Height (ImageID)
ImageID = MXImage_LoadFromURL (url.s)
Width = MXImage_Width (ImageID)
NewImageID = MXImageFilter_AffineTransform (imageID, m11.f, m12.f, m21.f, m22.f)
NewImageID = MXImageFilter_Crop (imageID, x.f, y.f, width.f, height.f)
NewImageID = MXImageFilter_ExposureAdjust (imageID, EV.f)
NewImageID = MXImageFilter_ComicEffect (imageID)
NewImageID = MXImageFilter_Grayscale (imageID)
NewImageID = MXImageFilter_NoiseReduction (imageID, noiseLevel.f, sharpness.f)
NewImageID = MXImageFilter_SharpenLuminance (imageID, sharpness.f)
NewImageID = MXImageFilter_UnsharpMask (imageID, radius.f, intensity.f)
The resulting image may not have the same size as the input image.
Other functions in the lib are related to speech and printing. Most likely I will post more on that in another thread.
An example of the image filters
Code: Select all
If OpenWindow(0, 0, 0, 245, 105, "MXImage Demo", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
img = MXImage_LoadFromURL("http://www.purebasic.com/images/box.png")
If img
img_t1 = MXImageFilter_Grayscale(img)
img_t2 = MXImageFilter_AffineTransform (img_t1, -1.5, 0, 0, 0.5)
ImageGadget(0, 10, 10, 100, 83, img)
ImageGadget(1, 130, 10, 100, 83, img_t2)
MX_Release(img_t2)
MX_Release(img_t1)
MX_Release(img)
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf