Hello,
I have successfully set up NPP on my C2D machine with GTX 470 installed. NPP is configured for VS2008 (Win7 64 bit).
Now the problem is that I want to read JPG and PNG image formats using FreeImage functions provided. This is the sequence of my calls:
-
Load a JPG (3Channel uint 8 datatype) image from image file.
-
Allocate device memory to port data to device (I use “nppiMalloc_8u_C3” which I hope is the right choice?)
-
Copy data into the device
-
Call my own kernel (just a simple kernel for testing purpose)
-
Bring data back into host pointer of type: Npp8u
-
Save image back into the result image file created using FreeImage functions.
Problem:
I print the 4 corner pixel values ( R,G,B ) after reading the image from host and it prints OK BUT when the data comes back it only has 50% of the image values and the rest are zero.
I would really appreciate if any sample code could show how to read, manipulate (write/call kernel) and write the result image back into the file.