for (i = 0; i < 7; i++)
coefficientBuffer[i]=(float) resizeFilterCoefficient[i];
cubicCoefficientsBuffer=CreateOpenCLBuffer(device,CL_MEM_COPY_HOST_PTR |
- CL_MEM_READ_ONLY,7*sizeof(*resizeFilterCoefficient),&coefficientBuffer);
+ CL_MEM_READ_ONLY,7*sizeof(*cubicCoefficientsBuffer),&coefficientBuffer);
if (cubicCoefficientsBuffer == (cl_mem) NULL)
{
(void) OpenCLThrowMagickException(device,exception,GetMagickModule(),
*/
static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
+ char
+ filename[MagickPathExtent];
+
FILE
*file;
(void) SetImageInfoProgressMonitor(read_info,(MagickProgressMonitor) NULL,
(void *) NULL);
SetImageInfoBlob(read_info,(void *) NULL,0);
- unique_file=AcquireUniqueFileResource(read_info->filename);
+ unique_file=AcquireUniqueFileResource(filename);
+ (void) FormatLocaleString(read_info->filename,MagickPathExtent,"sfw:%s",
+ filename);
for ( ; ; )
{
(void) memset(magick,0,sizeof(magick));
}
if (c == EOF)
{
- (void) RelinquishUniqueFileResource(read_info->filename);
+ (void) RelinquishUniqueFileResource(filename);
read_info=DestroyImageInfo(read_info);
ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile");
}
if (LocaleNCompare((char *) (magick+12),"SFW94A",6) != 0)
{
- (void) RelinquishUniqueFileResource(read_info->filename);
+ (void) RelinquishUniqueFileResource(filename);
read_info=DestroyImageInfo(read_info);
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
}
file=fdopen(unique_file,"wb");
if ((unique_file == -1) || (file == (FILE *) NULL))
{
- (void) RelinquishUniqueFileResource(read_info->filename);
+ (void) RelinquishUniqueFileResource(filename);
read_info=DestroyImageInfo(read_info);
ThrowFileException(exception,FileOpenError,"UnableToWriteFile",
image->filename);
(void) fclose(file);
if (c == EOF)
{
- (void) RelinquishUniqueFileResource(read_info->filename);
+ (void) RelinquishUniqueFileResource(filename);
read_info=DestroyImageInfo(read_info);
ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile");
}
}
if (unique_file != -1)
(void) close(unique_file);
- (void) RelinquishUniqueFileResource(read_info->filename);
+ (void) RelinquishUniqueFileResource(filename);
read_info=DestroyImageInfo(read_info);
if (image != (Image *) NULL)
{