AddUndoImage, DisplayCurrentPicture, GetPixelValue, GetPixelValueEx, SetPixelValue, SetPixelValueEx
Description
AddUndoImage();
This function creates a copy of the current image and appends it to the undo history. This might be helpful when you perform some processing that changes the current image but need the current image data at the same time.
Description
DisplayCurrentPicture();
This function performs a refresh of the current image.
Description
GetPixelValue( intUndoIndex
, intRow
, intCol
, intComponent
);
This function retrieves a value of the pixel specified by given coordinates.
Parameters
#importUC DisplayCurrentPicture; int main() { int rows, cols; AddUndoImage(); rows = 256; cols = 256; SetCommandText("Working..."); Get_Size(SIZE_PICTURE,NULL,NULL,&cols,&rows); //Enable_Interrupt_InScript(0); Enable_Interrupt_InScript(2); inter_sharpen(cols, rows); DisplayCurrentPicture(); } __underC int inter_sharpen(int cols, int rows) { int i, j, value; for(i=0; i<rows; ++i) { for(j=0; j<cols; ++j) { value = 5 * GetPixelValue(-1,i,j,0); value = value - GetPixelValue(-1, i-1,j, 0); value = value - GetPixelValue(-1, i+1,j, 0); value = value - GetPixelValue(-1, i,j+1, 0); value = value - GetPixelValue(-1, i,j-1, 0); if(value <0) value=0; if(value >255) value=255; SetPixelValue(0,value,i,j,0); } if(0 == i % 20) DisplayCurrentPicture(); } }
See Also
AddUndoImage
Description
GetPixelValueEx( intOpenDocumentIndex
, intUndoIndex
, intRow
, intCol
, int *ComponentArray
);
Retrieves a value of the pixel specified by given coordinates in any opened document.
Parameters
See Also
GetPixelValue
Description
SetPixelValue( intUndoIndex
, intValM
, intRow
, intCol
, intComponent
);
This function sets a new value to a pixel according to the given parameters.
Parameters
See Also
AddUndoImage