}
if (cache_info->type == PingCache)
return(MagickTrue);
- if (cache_info->type == DistributedCache)
+ if ((cache_info->type == DistributedCache) ||
+ (clone_info->type == DistributedCache))
return(PixelCacheCloneUnoptimized(clone_info,cache_info,exception));
p=cache_info->channel_map;
q=clone_info->channel_map;
Create pixel cache on disk.
*/
status=AcquireMagickResource(DiskResource,cache_info->length);
- if (status == MagickFalse)
+ if ((status == MagickFalse) || (cache_info->type == DistributedCache))
{
+ if (cache_info->type == DistributedCache)
+ RelinquishMagickResource(DiskResource,cache_info->length);
cache_info->server_info=AcquireDistributeCacheInfo(exception);
if (cache_info->server_info != (DistributeCacheInfo *) NULL)
{
if (status != MagickFalse)
{
cache_info->type=DistributedCache;
+ (void) FormatLocaleString(cache_info->cache_filename,
+ MaxTextExtent,"%s:%d",
+ GetDistributeCacheHostname(cache_info->server_info),
+ GetDistributeCachePort(cache_info->server_info));
if ((source_info.storage_class != UndefinedClass) &&
(mode != ReadMode))
{
exception);
RelinquishPixelCachePixels(&source_info);
}
- (void) FormatLocaleString(cache_info->cache_filename,
- MaxTextExtent,"%s:%d",
- GetDistributeCacheHostname(cache_info->server_info),
- GetDistributeCachePort(cache_info->server_info));
if (image->debug != MagickFalse)
{
(void) FormatMagickSize(cache_info->length,MagickFalse,
status=MagickTrue;
for (y=0; y < (ssize_t) rows; y++)
{
- status=ReadDistributePixelCachePixels(cache_info->server_info,
- ®ion,length,(unsigned char *) q);
+ status=ReadDistributePixelCachePixels(cache_info->server_info,®ion,
+ length,(unsigned char *) q);
if (status == MagickFalse)
break;
- q+=cache_info->number_channels*nexus_info->region.width;
+ q+=cache_info->metacontent_extent*nexus_info->region.width;
region.y++;
}
UnlockSemaphoreInfo(cache_info->file_semaphore);
status=MagickTrue;
for (y=0; y < (ssize_t) rows; y++)
{
- status=ReadDistributePixelCachePixels(cache_info->server_info,
- ®ion,length,(unsigned char *) q);
+ status=ReadDistributePixelCachePixels(cache_info->server_info,®ion,
+ length,(unsigned char *) q);
if (status == MagickFalse)
break;
q+=cache_info->number_channels*nexus_info->region.width;
cache_info->metacontent_extent,length,(const unsigned char *) p);
if ((MagickSizeType) count != length)
break;
- p+=nexus_info->region.width*cache_info->metacontent_extent;
+ p+=cache_info->metacontent_extent*nexus_info->region.width;
offset+=cache_info->columns;
}
if (IsFileDescriptorLimitExceeded() != MagickFalse)
status=MagickTrue;
for (y=0; y < (ssize_t) rows; y++)
{
- status=WriteDistributePixelCachePixels(cache_info->server_info,
- ®ion,length,(const unsigned char *) p);
+ status=WriteDistributePixelCachePixels(cache_info->server_info,®ion,
+ length,(const unsigned char *) p);
if (status == MagickFalse)
break;
- p+=nexus_info->region.width*cache_info->metacontent_extent;
+ p+=cache_info->metacontent_extent*nexus_info->region.width;
region.y++;
}
UnlockSemaphoreInfo(cache_info->file_semaphore);
status=MagickTrue;
for (y=0; y < (ssize_t) rows; y++)
{
- status=WriteDistributePixelCachePixels(cache_info->server_info,
- ®ion,length,(const unsigned char *) p);
+ status=WriteDistributePixelCachePixels(cache_info->server_info,®ion,
+ length,(const unsigned char *) p);
if (status == MagickFalse)
break;
p+=cache_info->number_channels*nexus_info->region.width;
*hostname;
DistributeCacheInfo
- *distribute_cache_info;
+ *server_info;
MagickSizeType
session_key;
- distribute_cache_info=(DistributeCacheInfo *) AcquireMagickMemory(
- sizeof(*distribute_cache_info));
- if (distribute_cache_info == (DistributeCacheInfo *) NULL)
+ server_info=(DistributeCacheInfo *) AcquireMagickMemory(sizeof(*server_info));
+ if (server_info == (DistributeCacheInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
- (void) ResetMagickMemory(distribute_cache_info,0,
- sizeof(*distribute_cache_info));
- distribute_cache_info->signature=MagickSignature;
+ (void) ResetMagickMemory(server_info,0,sizeof(*server_info));
+ server_info->signature=MagickSignature;
/*
Contact pixel cache server.
*/
- distribute_cache_info->port=0;
- hostname=GetHostname(&distribute_cache_info->port,exception);
+ server_info->port=0;
+ hostname=GetHostname(&server_info->port,exception);
session_key=0;
- distribute_cache_info->file=ConnectPixelCacheServer(hostname,
- distribute_cache_info->port,&session_key,exception);
- distribute_cache_info->session_key=session_key;
- (void) CopyMagickString(distribute_cache_info->hostname,hostname,
- MaxTextExtent);
+ server_info->file=ConnectPixelCacheServer(hostname,server_info->port,
+ &session_key,exception);
+ server_info->session_key=session_key;
+ (void) CopyMagickString(server_info->hostname,hostname,MaxTextExtent);
hostname=DestroyString(hostname);
- if (distribute_cache_info->file == -1)
- distribute_cache_info=DestroyDistributeCacheInfo(distribute_cache_info);
- return(distribute_cache_info);
+ if (server_info->file == -1)
+ server_info=DestroyDistributeCacheInfo(server_info);
+ return(server_info);
}
\f
/*
% The format of the DestroyDistributeCacheInfo method is:
%
% DistributeCacheInfo *DestroyDistributeCacheInfo(
-% DistributeCacheInfo *distribute_cache_info)
+% DistributeCacheInfo *server_info)
%
% A description of each parameter follows:
%
-% o distribute_cache_info: the distributed cache info.
+% o server_info: the distributed cache info.
%
*/
MagickPrivate DistributeCacheInfo *DestroyDistributeCacheInfo(
- DistributeCacheInfo *distribute_cache_info)
+ DistributeCacheInfo *server_info)
{
- assert(distribute_cache_info != (DistributeCacheInfo *) NULL);
- assert(distribute_cache_info->signature == MagickSignature);
- distribute_cache_info->signature=(~MagickSignature);
- distribute_cache_info=(DistributeCacheInfo *) RelinquishMagickMemory(
- distribute_cache_info);
- return(distribute_cache_info);
+ assert(server_info != (DistributeCacheInfo *) NULL);
+ assert(server_info->signature == MagickSignature);
+ server_info->signature=(~MagickSignature);
+ server_info=(DistributeCacheInfo *) RelinquishMagickMemory(server_info);
+ return(server_info);
}
\f
/*
%
% The format of the GetDistributeCacheFile method is:
%
-% int GetDistributeCacheFile(
-% const DistributeCacheInfo *distribute_cache_info)
+% int GetDistributeCacheFile(const DistributeCacheInfo *server_info)
%
% A description of each parameter follows:
%
-% o distribute_cache_info: the distributed cache info.
+% o server_info: the distributed cache info.
%
*/
-MagickPrivate int GetDistributeCacheFile(
- const DistributeCacheInfo *distribute_cache_info)
+MagickPrivate int GetDistributeCacheFile(const DistributeCacheInfo *server_info)
{
- assert(distribute_cache_info != (DistributeCacheInfo *) NULL);
- assert(distribute_cache_info->signature == MagickSignature);
- return(distribute_cache_info->file);
+ assert(server_info != (DistributeCacheInfo *) NULL);
+ assert(server_info->signature == MagickSignature);
+ return(server_info->file);
}
\f
/*
% The format of the GetDistributeCacheHostname method is:
%
% const char *GetDistributeCacheHostname(
-% const DistributeCacheInfo *distribute_cache_info)
+% const DistributeCacheInfo *server_info)
%
% A description of each parameter follows:
%
-% o distribute_cache_info: the distributed cache info.
+% o server_info: the distributed cache info.
%
*/
MagickPrivate const char *GetDistributeCacheHostname(
- const DistributeCacheInfo *distribute_cache_info)
+ const DistributeCacheInfo *server_info)
{
- assert(distribute_cache_info != (DistributeCacheInfo *) NULL);
- assert(distribute_cache_info->signature == MagickSignature);
- return(distribute_cache_info->hostname);
+ assert(server_info != (DistributeCacheInfo *) NULL);
+ assert(server_info->signature == MagickSignature);
+ return(server_info->hostname);
}
\f
/*
% The format of the GetDistributeCachePort method is:
%
% int GetDistributeCachePort(
-% const DistributeCacheInfo *distribute_cache_info)
+% const DistributeCacheInfo *server_info)
%
% A description of each parameter follows:
%
-% o distribute_cache_info: the distributed cache info.
+% o server_info: the distributed cache info.
%
*/
-MagickPrivate int GetDistributeCachePort(
- const DistributeCacheInfo *distribute_cache_info)
+MagickPrivate int GetDistributeCachePort(const DistributeCacheInfo *server_info)
{
- assert(distribute_cache_info != (DistributeCacheInfo *) NULL);
- assert(distribute_cache_info->signature == MagickSignature);
- return(distribute_cache_info->port);
+ assert(server_info != (DistributeCacheInfo *) NULL);
+ assert(server_info->signature == MagickSignature);
+ return(server_info->port);
}
\f
/*
% The format of the OpenDistributePixelCache method is:
%
% MagickBooleanType *OpenDistributePixelCache(
-% DistributeCacheInfo *distribute_cache_info,Image *image)
+% DistributeCacheInfo *server_info,Image *image)
%
% A description of each parameter follows:
%
-% o distribute_cache_info: the distributed cache info.
+% o server_info: the distributed cache info.
%
% o image: the image.
%
*/
MagickPrivate MagickBooleanType OpenDistributePixelCache(
- DistributeCacheInfo *distribute_cache_info,Image *image)
+ DistributeCacheInfo *server_info,Image *image)
{
MagickBooleanType
status;
unsigned char
buffer[MaxTextExtent];
- assert(distribute_cache_info != (DistributeCacheInfo *) NULL);
- assert(distribute_cache_info->signature == MagickSignature);
+ assert(server_info != (DistributeCacheInfo *) NULL);
+ assert(server_info->signature == MagickSignature);
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
p=buffer;
*p++='o'; /* open */
- (void) memcpy(p,&distribute_cache_info->session_key,
- sizeof(distribute_cache_info->session_key));
- p+=sizeof(distribute_cache_info->session_key);
+ (void) memcpy(p,&server_info->session_key,sizeof(server_info->session_key));
+ p+=sizeof(server_info->session_key);
(void) memcpy(p,&image->columns,sizeof(image->columns));
p+=sizeof(image->columns);
(void) memcpy(p,&image->rows,sizeof(image->rows));
p+=sizeof(image->rows);
(void) memcpy(p,&image->number_channels,sizeof(image->number_channels));
p+=sizeof(image->number_channels);
- count=send(distribute_cache_info->file,buffer,p-buffer,0);
+ count=send(server_info->file,buffer,p-buffer,0);
if (count != (ssize_t) (p-buffer))
return(MagickFalse);
- count=recv(distribute_cache_info->file,&status,sizeof(status),0);
+ count=recv(server_info->file,&status,sizeof(status),0);
if (count != (ssize_t) sizeof(status))
return(MagickFalse);
return(MagickTrue);
% The format of the ReadDistributePixelCacheMetacontents method is:
%
% MagickBooleanType *ReadDistributePixelCacheMetacontents(
-% DistributeCacheInfo *distribute_cache_info,const RectangleInfo *region,
+% DistributeCacheInfo *server_info,const RectangleInfo *region,
% const MagickSizeType length,unsigned char *metacontent)
%
% A description of each parameter follows:
%
-% o distribute_cache_info: the distributed cache info.
+% o server_info: the distributed cache info.
%
% o image: the image.
%
%
*/
MagickPrivate MagickBooleanType ReadDistributePixelCacheMetacontent(
- DistributeCacheInfo *distribute_cache_info,const RectangleInfo *region,
+ DistributeCacheInfo *server_info,const RectangleInfo *region,
const MagickSizeType length,unsigned char *metacontent)
{
MagickBooleanType
unsigned char
buffer[MaxTextExtent];
- assert(distribute_cache_info != (DistributeCacheInfo *) NULL);
- assert(distribute_cache_info->signature == MagickSignature);
+ assert(server_info != (DistributeCacheInfo *) NULL);
+ assert(server_info->signature == MagickSignature);
assert(region != (RectangleInfo *) NULL);
assert(metacontent != (unsigned char *) NULL);
assert(length == ((size_t) length));
p=buffer;
*p++='R'; /* read */
- (void) memcpy(p,&distribute_cache_info->session_key,
- sizeof(distribute_cache_info->session_key));
- p+=sizeof(distribute_cache_info->session_key);
+ (void) memcpy(p,&server_info->session_key,sizeof(server_info->session_key));
+ p+=sizeof(server_info->session_key);
(void) memcpy(p,®ion->width,sizeof(region->width));
p+=sizeof(region->width);
(void) memcpy(p,®ion->height,sizeof(region->height));
p+=sizeof(region->y);
(void) memcpy(p,&length,sizeof(length));
p+=sizeof(length);
- count=send(distribute_cache_info->file,buffer,p-buffer,0);
+ count=send(server_info->file,buffer,p-buffer,0);
if (count != (ssize_t) (p-buffer))
return(MagickFalse);
- count=recv(distribute_cache_info->file,(unsigned char *) metacontent,(size_t)
+ count=recv(server_info->file,(unsigned char *) metacontent,(size_t)
length,0);
if (count != (ssize_t) length)
return(MagickFalse);
- count=recv(distribute_cache_info->file,&status,sizeof(status),0);
+ count=recv(server_info->file,&status,sizeof(status),0);
if (count != (ssize_t) sizeof(status))
return(MagickFalse);
return(status != 0 ? MagickTrue : MagickFalse);
% The format of the ReadDistributePixelCachePixels method is:
%
% MagickBooleanType *ReadDistributePixelCachePixels(
-% DistributeCacheInfo *distribute_cache_info,const RectangleInfo *region,
+% DistributeCacheInfo *server_info,const RectangleInfo *region,
% const MagickSizeType length,unsigned char *pixels)
%
% A description of each parameter follows:
%
-% o distribute_cache_info: the distributed cache info.
+% o server_info: the distributed cache info.
%
% o image: the image.
%
%
*/
MagickPrivate MagickBooleanType ReadDistributePixelCachePixels(
- DistributeCacheInfo *distribute_cache_info,const RectangleInfo *region,
+ DistributeCacheInfo *server_info,const RectangleInfo *region,
const MagickSizeType length,unsigned char *pixels)
{
MagickBooleanType
unsigned char
buffer[MaxTextExtent];
- assert(distribute_cache_info != (DistributeCacheInfo *) NULL);
- assert(distribute_cache_info->signature == MagickSignature);
+ assert(server_info != (DistributeCacheInfo *) NULL);
+ assert(server_info->signature == MagickSignature);
assert(region != (RectangleInfo *) NULL);
assert(pixels != (unsigned char *) NULL);
assert(length == ((size_t) length));
p=buffer;
*p++='r'; /* read */
- (void) memcpy(p,&distribute_cache_info->session_key,
- sizeof(distribute_cache_info->session_key));
- p+=sizeof(distribute_cache_info->session_key);
+ (void) memcpy(p,&server_info->session_key,sizeof(server_info->session_key));
+ p+=sizeof(server_info->session_key);
(void) memcpy(p,®ion->width,sizeof(region->width));
p+=sizeof(region->width);
(void) memcpy(p,®ion->height,sizeof(region->height));
p+=sizeof(region->y);
(void) memcpy(p,&length,sizeof(length));
p+=sizeof(length);
- count=send(distribute_cache_info->file,buffer,p-buffer,0);
+ count=send(server_info->file,buffer,p-buffer,0);
if (count != (ssize_t) (p-buffer))
return(MagickFalse);
- count=recv(distribute_cache_info->file,(unsigned char *) pixels,(size_t)
- length,0);
+ count=recv(server_info->file,(unsigned char *) pixels,(size_t) length,0);
if (count != (ssize_t) length)
return(MagickFalse);
- count=recv(distribute_cache_info->file,&status,sizeof(status),0);
+ count=recv(server_info->file,&status,sizeof(status),0);
if (count != (ssize_t) sizeof(status))
return(MagickFalse);
return(status != 0 ? MagickTrue : MagickFalse);
% The format of the RelinquishDistributePixelCache method is:
%
% MagickBooleanType RelinquishDistributePixelCache(
-% DistributeCacheInfo *distribute_cache_info)
+% DistributeCacheInfo *server_info)
%
% A description of each parameter follows:
%
-% o distribute_cache_info: the distributed cache info.
+% o server_info: the distributed cache info.
%
*/
MagickPrivate MagickBooleanType RelinquishDistributePixelCache(
- DistributeCacheInfo *distribute_cache_info)
+ DistributeCacheInfo *server_info)
{
register unsigned char
*p;
unsigned char
buffer[MaxTextExtent];
- assert(distribute_cache_info != (DistributeCacheInfo *) NULL);
- assert(distribute_cache_info->signature == MagickSignature);
+ assert(server_info != (DistributeCacheInfo *) NULL);
+ assert(server_info->signature == MagickSignature);
p=buffer;
*p++='d'; /* delete */
- (void) memcpy(p,&distribute_cache_info->session_key,
- sizeof(distribute_cache_info->session_key));
- p+=sizeof(distribute_cache_info->session_key);
- count=send(distribute_cache_info->file,buffer,p-buffer,0);
+ (void) memcpy(p,&server_info->session_key,sizeof(server_info->session_key));
+ p+=sizeof(server_info->session_key);
+ count=send(server_info->file,buffer,p-buffer,0);
if (count != (ssize_t) (p-buffer))
return(MagickFalse);
return(MagickTrue);
% The format of the WriteDistributePixelCacheMetacontents method is:
%
% MagickBooleanType *WriteDistributePixelCacheMetacontents(
-% DistributeCacheInfo *distribute_cache_info,const RectangleInfo *region,
+% DistributeCacheInfo *server_info,const RectangleInfo *region,
% const MagickSizeType length,const unsigned char *metacontent)
%
% A description of each parameter follows:
%
-% o distribute_cache_info: the distributed cache info.
+% o server_info: the distributed cache info.
%
% o image: the image.
%
%
*/
MagickPrivate MagickBooleanType WriteDistributePixelCacheMetacontent(
- DistributeCacheInfo *distribute_cache_info,const RectangleInfo *region,
+ DistributeCacheInfo *server_info,const RectangleInfo *region,
const MagickSizeType length,const unsigned char *metacontent)
{
MagickBooleanType
unsigned char
buffer[MaxTextExtent];
- assert(distribute_cache_info != (DistributeCacheInfo *) NULL);
- assert(distribute_cache_info->signature == MagickSignature);
+ assert(server_info != (DistributeCacheInfo *) NULL);
+ assert(server_info->signature == MagickSignature);
assert(region != (RectangleInfo *) NULL);
assert(metacontent != (unsigned char *) NULL);
assert(length == ((size_t) length));
p=buffer;
*p++='W'; /* write */
- (void) memcpy(p,&distribute_cache_info->session_key,
- sizeof(distribute_cache_info->session_key));
- p+=sizeof(distribute_cache_info->session_key);
+ (void) memcpy(p,&server_info->session_key,sizeof(server_info->session_key));
+ p+=sizeof(server_info->session_key);
(void) memcpy(p,®ion->width,sizeof(region->width));
p+=sizeof(region->width);
(void) memcpy(p,®ion->height,sizeof(region->height));
p+=sizeof(region->y);
(void) memcpy(p,&length,sizeof(length));
p+=sizeof(length);
- count=send(distribute_cache_info->file,buffer,p-buffer,0);
+ count=send(server_info->file,buffer,p-buffer,0);
if (count != (ssize_t) (p-buffer))
return(MagickFalse);
- count=send(distribute_cache_info->file,(unsigned char *) metacontent,(size_t)
+ count=send(server_info->file,(unsigned char *) metacontent,(size_t)
length,0);
if (count != (ssize_t) length)
return(MagickFalse);
- count=recv(distribute_cache_info->file,&status,sizeof(status),0);
+ count=recv(server_info->file,&status,sizeof(status),0);
if (count != (ssize_t) sizeof(status))
return(MagickFalse);
return(status != 0 ? MagickTrue : MagickFalse);
% The format of the WriteDistributePixelCachePixels method is:
%
% MagickBooleanType *WriteDistributePixelCachePixels(
-% DistributeCacheInfo *distribute_cache_info,const RectangleInfo *region,
+% DistributeCacheInfo *server_info,const RectangleInfo *region,
% const MagickSizeType length,const unsigned char *pixels)
%
% A description of each parameter follows:
%
-% o distribute_cache_info: the distributed cache info.
+% o server_info: the distributed cache info.
%
% o image: the image.
%
%
*/
MagickPrivate MagickBooleanType WriteDistributePixelCachePixels(
- DistributeCacheInfo *distribute_cache_info,const RectangleInfo *region,
+ DistributeCacheInfo *server_info,const RectangleInfo *region,
const MagickSizeType length,const unsigned char *pixels)
{
MagickBooleanType
unsigned char
buffer[MaxTextExtent];
- assert(distribute_cache_info != (DistributeCacheInfo *) NULL);
- assert(distribute_cache_info->signature == MagickSignature);
+ assert(server_info != (DistributeCacheInfo *) NULL);
+ assert(server_info->signature == MagickSignature);
assert(region != (RectangleInfo *) NULL);
assert(pixels != (const unsigned char *) NULL);
assert(length == ((size_t) length));
p=buffer;
*p++='w'; /* write */
- (void) memcpy(p,&distribute_cache_info->session_key,
- sizeof(distribute_cache_info->session_key));
- p+=sizeof(distribute_cache_info->session_key);
+ (void) memcpy(p,&server_info->session_key,sizeof(server_info->session_key));
+ p+=sizeof(server_info->session_key);
(void) memcpy(p,®ion->width,sizeof(region->width));
p+=sizeof(region->width);
(void) memcpy(p,®ion->height,sizeof(region->height));
p+=sizeof(region->y);
(void) memcpy(p,&length,sizeof(length));
p+=sizeof(length);
- count=send(distribute_cache_info->file,buffer,p-buffer,0);
+ count=send(server_info->file,buffer,p-buffer,0);
if (count != (ssize_t) (p-buffer))
return(MagickFalse);
- count=send(distribute_cache_info->file,(unsigned char *) pixels,(size_t)
+ count=send(server_info->file,(unsigned char *) pixels,(size_t)
length,0);
if (count != (ssize_t) length)
return(MagickFalse);
- count=recv(distribute_cache_info->file,&status,sizeof(status),0);
+ count=recv(server_info->file,&status,sizeof(status),0);
if (count != (ssize_t) sizeof(status))
return(MagickFalse);
return(status != 0 ? MagickTrue : MagickFalse);
{
degrees+=5.0;
preview_image=ShearImage(thumbnail,degrees,degrees,exception);
- (void) FormatLocaleString(label,MaxTextExtent,"shear %gx%g",
- degrees,2.0*degrees);
+ (void) FormatLocaleString(label,MaxTextExtent,"shear %gx%g",degrees,
+ 2.0*degrees);
break;
}
case RollPreview:
preview_image=CloneImage(thumbnail,0,0,MagickTrue,exception);
if (preview_image == (Image *) NULL)
break;
- (void) FormatLocaleString(factor,MaxTextExtent,"100,100,%g",
- 2.0*percentage);
+ (void) FormatLocaleString(factor,MaxTextExtent,"100,100,%g",2.0*
+ percentage);
(void) ModulateImage(preview_image,factor,exception);
(void) FormatLocaleString(label,MaxTextExtent,"modulate %s",factor);
break;
preview_image=CloneImage(thumbnail,0,0,MagickTrue,exception);
if (preview_image == (Image *) NULL)
break;
- (void) FormatLocaleString(factor,MaxTextExtent,"100,%g",
- 2.0*percentage);
+ (void) FormatLocaleString(factor,MaxTextExtent,"100,%g",2.0*percentage);
(void) ModulateImage(preview_image,factor,exception);
(void) FormatLocaleString(label,MaxTextExtent,"modulate %s",factor);
break;
case SharpenPreview:
{
preview_image=SharpenImage(thumbnail,radius,sigma,exception);
- (void) FormatLocaleString(label,MaxTextExtent,"sharpen %gx%g",
- radius,sigma);
+ (void) FormatLocaleString(label,MaxTextExtent,"sharpen %gx%g",radius,
+ sigma);
break;
}
case BlurPreview:
break;
(void) BilevelImage(thumbnail,(double) (percentage*((double)
QuantumRange+1.0))/100.0,exception);
- (void) FormatLocaleString(label,MaxTextExtent,"threshold %g",
- (double) (percentage*((double) QuantumRange+1.0))/100.0);
+ (void) FormatLocaleString(label,MaxTextExtent,"threshold %g",(double)
+ (percentage*((double) QuantumRange+1.0))/100.0);
break;
}
case EdgeDetectPreview:
{
preview_image=SpreadImage(thumbnail,radius,thumbnail->interpolate,
exception);
- (void) FormatLocaleString(label,MaxTextExtent,"spread %g",
- radius+0.5);
+ (void) FormatLocaleString(label,MaxTextExtent,"spread %g",radius+0.5);
break;
}
case SolarizePreview:
preview_image=CloneImage(thumbnail,0,0,MagickTrue,exception);
if (preview_image == (Image *) NULL)
break;
- (void) SolarizeImage(preview_image,(double) QuantumRange*
- percentage/100.0,exception);
+ (void) SolarizeImage(preview_image,(double) QuantumRange*percentage/
+ 100.0,exception);
(void) FormatLocaleString(label,MaxTextExtent,"solarize %g",
(QuantumRange*percentage)/100.0);
break;
degrees+=10.0;
preview_image=ShadeImage(thumbnail,MagickTrue,degrees,degrees,
exception);
- (void) FormatLocaleString(label,MaxTextExtent,"shade %gx%g",
- degrees,degrees);
+ (void) FormatLocaleString(label,MaxTextExtent,"shade %gx%g",degrees,
+ degrees);
break;
}
case RaisePreview:
degrees+=5.0f;
preview_image=WaveImage(thumbnail,0.5*degrees,2.0*degrees,
image->interpolate,exception);
- (void) FormatLocaleString(label,MaxTextExtent,"wave %gx%g",
- 0.5*degrees,2.0*degrees);
+ (void) FormatLocaleString(label,MaxTextExtent,"wave %gx%g",0.5*degrees,
+ 2.0*degrees);
break;
}
case OilPaintPreview:
{
preview_image=OilPaintImage(thumbnail,(double) radius,(double) sigma,
exception);
- (void) FormatLocaleString(label,MaxTextExtent,"charcoal %gx%g",
- radius,sigma);
+ (void) FormatLocaleString(label,MaxTextExtent,"charcoal %gx%g",radius,
+ sigma);
break;
}
case CharcoalDrawingPreview:
{
preview_image=CharcoalImage(thumbnail,(double) radius,(double) sigma,
exception);
- (void) FormatLocaleString(label,MaxTextExtent,"charcoal %gx%g",
- radius,sigma);
+ (void) FormatLocaleString(label,MaxTextExtent,"charcoal %gx%g",radius,
+ sigma);
break;
}
case JPEGPreview: