Problem when texturing a processed image with OptiX

once an original PPM format image in OptiX is processed by photoshop ,such as,changing the size,adding some text and so on ,the processed picture can not be loaded with OptiX,the error is"No buffer dimension is zero,unless all are zero".Who can tell me how could I address this problem?

It sounds like you are trying to load your image (which probably has dimensions m x n) into a buffer with the wrong dimensions (for instance 0 x n or m x 0). Try printing the dimensions of the buffer when you create it to check that they are correct.

Can you show us the code you are using to create the buffer?

Find your call to rtBufferSetSize. One of the three dimensions is zero, but not all of them are. Could be from your image.

The first three lines of PPM images are text, like this:

256 256

The image dimensions are 256x256. I bet in your image it’s 0 256 or some such.