queue=AcquireOpenCLCommandQueue(device);
if (queue == (cl_command_queue) NULL)
goto cleanup;
- imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
- if (imageBuffer == (cl_mem) NULL)
- goto cleanup;
filteredImage=CloneImage(image,image->columns,image->rows,MagickTrue,
exception);
if (filteredImage == (Image *) NULL)
goto cleanup;
+ if (filteredImage->number_channels != image->number_channels)
+ goto cleanup;
+ imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
+ if (imageBuffer == (cl_mem) NULL)
+ goto cleanup;
filteredImageBuffer=GetAuthenticOpenCLBuffer(filteredImage,device,exception);
if (filteredImageBuffer == (cl_mem) NULL)
goto cleanup;
device=RequestOpenCLDevice(clEnv);
queue=AcquireOpenCLCommandQueue(device);
- imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
- if (imageBuffer == (cl_mem) NULL)
- goto cleanup;
filteredImage=CloneImage(image,image->columns,image->rows,MagickTrue,
exception);
if (filteredImage == (Image *) NULL)
goto cleanup;
+ if (filteredImage->number_channels != image->number_channels)
+ goto cleanup;
+ imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
+ if (imageBuffer == (cl_mem) NULL)
+ goto cleanup;
filteredImageBuffer=GetAuthenticOpenCLBuffer(filteredImage,device,exception);
if (filteredImageBuffer == (cl_mem) NULL)
goto cleanup;
device=RequestOpenCLDevice(clEnv);
queue=AcquireOpenCLCommandQueue(device);
- imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
- if (imageBuffer == (cl_mem) NULL)
- goto cleanup;
filteredImage=CloneImage(image,resizedColumns,resizedRows,MagickTrue,
exception);
if (filteredImage == (Image *) NULL)
goto cleanup;
+ if (filteredImage->number_channels != image->number_channels)
+ goto cleanup;
+ imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
+ if (imageBuffer == (cl_mem) NULL)
+ goto cleanup;
filteredImageBuffer=GetAuthenticOpenCLBuffer(filteredImage,device,exception);
if (filteredImageBuffer == (cl_mem) NULL)
goto cleanup;
device=RequestOpenCLDevice(clEnv);
queue=AcquireOpenCLCommandQueue(device);
- imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
- if (imageBuffer == (cl_mem) NULL)
- goto cleanup;
filteredImage=CloneImage(image,image->columns,image->rows,MagickTrue,
exception);
if (filteredImage == (Image *) NULL)
goto cleanup;
+ if (filteredImage->number_channels != image->number_channels)
+ goto cleanup;
+ imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
+ if (imageBuffer == (cl_mem) NULL)
+ goto cleanup;
filteredImageBuffer=GetAuthenticOpenCLBuffer(filteredImage,device,exception);
if (filteredImageBuffer == (cl_mem) NULL)
goto cleanup;
device=RequestOpenCLDevice(clEnv);
queue=AcquireOpenCLCommandQueue(device);
- imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
- if (imageBuffer == (cl_mem) NULL)
- goto cleanup;
filteredImage=CloneImage(image,image->columns,image->rows,MagickTrue,
exception);
if (filteredImage == (Image *) NULL)
goto cleanup;
+ if (filteredImage->number_channels != image->number_channels)
+ goto cleanup;
+ imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
+ if (imageBuffer == (cl_mem) NULL)
+ goto cleanup;
filteredImageBuffer=GetAuthenticOpenCLBuffer(filteredImage,device,exception);
if (filteredImageBuffer == (cl_mem) NULL)
goto cleanup;
device=RequestOpenCLDevice(clEnv);
queue=AcquireOpenCLCommandQueue(device);
- imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
- if (imageBuffer == (cl_mem) NULL)
- goto cleanup;
filteredImage=CloneImage(image,image->columns,image->rows,MagickTrue,
exception);
if (filteredImage == (Image *) NULL)
goto cleanup;
+ if (filteredImage->number_channels != image->number_channels)
+ goto cleanup;
+ imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
+ if (imageBuffer == (cl_mem) NULL)
+ goto cleanup;
filteredImageBuffer=GetAuthenticOpenCLBuffer(filteredImage,device,exception);
if (filteredImageBuffer == (cl_mem) NULL)
goto cleanup;
device=RequestOpenCLDevice(clEnv);
queue=AcquireOpenCLCommandQueue(device);
- imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
- if (imageBuffer == (cl_mem) NULL)
- goto cleanup;
filteredImage=CloneImage(image,image->columns,image->rows,MagickTrue,
exception);
if (filteredImage == (Image *) NULL)
goto cleanup;
+ if (filteredImage->number_channels != image->number_channels)
+ goto cleanup;
+ imageBuffer=GetAuthenticOpenCLBuffer(image,device,exception);
+ if (imageBuffer == (cl_mem) NULL)
+ goto cleanup;
filteredImageBuffer=GetAuthenticOpenCLBuffer(filteredImage,device,exception);
if (filteredImageBuffer == (cl_mem) NULL)
goto cleanup;