![]() ![]() You must pass your function that will display filtering progress (optional). pspiSetProgressCallBack(PROGRESSCALLBACK progressProc) sets progress procedure call-back.You don't need to call this API as it's called by host on exit, but if you're working with big images, sometimes it may come handy. Source image is shared and dest image is owned by pspiHost. When image to be filtered is passed to pspiHost, a copy of source image is created (dest). pspiReleaseAllImages(void) releases all images and mask memory.pspiFinishMaskSL(int maskStride = 0) similar to pspiFinsihImageSL.pspiAddMaskSL(void *maskScanLine) similar to pspiAddImageSL.pspiStartMaskSL(int width, int height, bool useMaskByPi = true) similar to pspiStartImageSL, but deals with mask.Destination image strides are callculated by pspiHost. If values for stride are not passed, destination image is not aligned to source image scanline boundary. pspiFinishImageSL(int imageStride = 0, int alphaStride = 0) finishes scanline addition and completely sets host image container.This API must be called in a loop and caller must know scanlines orientation (first scanline first or last scanline first). pspiAddImageSL(void *imageScanLine, void *alphaScanLine = 0) adds one scanline at the time to host image container.This option deals with images with non-contiguous memory or with images with unknown scanline alignement, so stride value can not be calculated. pspiStartImageSL(TImgType type, int width, int height, bool externalAlpha = false) prepares host image container for accepting source image scanlines.This holds also when mask is set by scanline addition. Calling pspiSetMask without parameters releases mask (internal scanline pointers). This value tells if the mask will be used by plug-in (if supported by plug-in) or only for blending filtered and source image. Contiguous buffer must be passed, as well as mask width, height (the same size as image), mask stride value and boolean value useMakByPi. pspiSetMask(int width = 0, int height = 0, void *maskBuff = 0, int maskStride = 0, bool useMaskByPi = true) sets 8-bit single channel grayscale mask.Also, you must pass image type, image width, height and image stride value and alpha stride value if alpha buffer is not-null. If image has external alpha channel, pointer to alpha buffer can be passed as well. pspiSetImage(TImgType type, int width, int height, void *imageBuff, int imageStride, void *alphaBuff = 0, int alphaStride = 0) sets source image by passing contiguous image buffer pointer.This API does not have to be called if image scanlines are top-down oriented (OpenCV Mat). Has no effect when scanlines are added one by one. Must be set once before setting image using buffer. Last option internaly inverts image scanlines (used if image upside-down). pspiSetImageOrientation(TImgOrientation orientation) sets image orientation (PSPI_IMG_ORIENTATION_ASIS, PSPI_IMG_ORIENTATION_INVERT).Calling pspiSetRoi without arguments, clears filter rectangle. pspiSetRoi(int top = 0, int left = 0, int bottom = 0, int right = 0) sets ROI (region of interest) to be filtered (rectangle).pspiSetPath(const wchar_t *filterFolder) sets path to filters directory (usually some 8bf collection).pspiGetVersion(void) get current version: returns pointer to 3 charactes describing pspiHost version (currently 0.9).C++ compiler (tested on Visual Studio 2017).Big document support (prepared but not yet implemented).Image can be passed to engine using single contiguous image buffer, or by adding scalines (for possibly non-contiguous image buffers). Host engine can be used also from Embarcadero C++ and Delphi: check Additional directory for OMF libs (for C++) and converted headers (pas files for Delphi).Įngine can be built in 32/64-bit mode and it supports 32/64-bit filters respectively.īefore building pspiHost, you must download Adobe Photoshop SDK and copy following SDK directories in photoshopapi directory under pspiHost: The code is written in VisualStudio 2017 C++ for Windows platform. This dll engine enables loading and executing 8bf filters from user application. Plugin host for 8bf Photoshop filters pspiHost.dll
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |