本文整理汇总了C++中IsEventLogging函数的典型用法代码示例。如果您正苦于以下问题:C++ IsEventLogging函数的具体用法?C++ IsEventLogging怎么用?C++ IsEventLogging使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsEventLogging函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: return
bool Magick::Options::debug(void) const
{
if (IsEventLogging())
return(true);
return(false);
}
开发者ID:INT2208-ST,项目名称:MyFriend,代码行数:7,代码来源:Options.cpp
示例2: assert
MagickExport CacheView *AcquireVirtualCacheView(const Image *image,
ExceptionInfo *exception)
{
CacheView
*restrict cache_view;
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
(void) exception;
cache_view=(CacheView *) MagickAssumeAligned(AcquireAlignedMemory(1,
sizeof(*cache_view)));
if (cache_view == (CacheView *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(cache_view,0,sizeof(*cache_view));
cache_view->image=ReferenceImage((Image *) image);
cache_view->number_threads=GetOpenMPMaximumThreads();
if (GetMagickResourceLimit(ThreadResource) > cache_view->number_threads)
cache_view->number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
if (cache_view->number_threads == 0)
cache_view->number_threads=1;
cache_view->nexus_info=AcquirePixelCacheNexus(cache_view->number_threads);
cache_view->virtual_pixel_method=GetImageVirtualPixelMethod(image);
cache_view->debug=IsEventLogging();
cache_view->signature=MagickSignature;
if (cache_view->nexus_info == (NexusInfo **) NULL)
ThrowFatalException(CacheFatalError,"UnableToAcquireCacheView");
return(cache_view);
}
开发者ID:divyasnair123,项目名称:vegetable_store,代码行数:30,代码来源:cache-view.c
示例3: NewImageViewRegion
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% N e w I m a g e V i e w R e g i o n %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% NewImageViewRegion() returns a image view required for all other methods
% in the Image View API.
%
% The format of the NewImageViewRegion method is:
%
% ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
% const ssize_t y,const size_t width,const size_t height)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
% o x,y,columns,rows: These values define the perimeter of a extent of
% pixel_wands view.
%
*/
MagickExport ImageView *NewImageViewRegion(Image *image,const ssize_t x,
const ssize_t y,const size_t width,const size_t height)
{
ImageView
*image_view;
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
image_view=(ImageView *) AcquireMagickMemory(sizeof(*image_view));
if (image_view == (ImageView *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(image_view,0,sizeof(*image_view));
image_view->description=ConstantString("ImageView");
image_view->view=AcquireCacheView(image_view->image);
image_view->image=image;
image_view->extent.width=width;
image_view->extent.height=height;
image_view->extent.x=x;
image_view->extent.y=y;
image_view->number_threads=GetOpenMPMaximumThreads();
image_view->exception=AcquireExceptionInfo();
image_view->debug=IsEventLogging();
image_view->signature=MagickSignature;
return(image_view);
}
开发者ID:jlubea,项目名称:propelize,代码行数:52,代码来源:image-view.c
示例4: GetMontageInfo
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% G e t M o n t a g e I n f o %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% GetMontageInfo() initializes montage_info to default values.
%
% The format of the GetMontageInfo method is:
%
% void GetMontageInfo(const ImageInfo *image_info,
% MontageInfo *montage_info)
%
% A description of each parameter follows:
%
% o image_info: a structure of type ImageInfo.
%
% o montage_info: Specifies a pointer to a MontageInfo structure.
%
*/
MagickExport void GetMontageInfo(const ImageInfo *image_info,
MontageInfo *montage_info)
{
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image_info->filename);
assert(montage_info != (MontageInfo *) NULL);
(void) ResetMagickMemory(montage_info,0,sizeof(*montage_info));
(void) CopyMagickString(montage_info->filename,image_info->filename,
MagickPathExtent);
montage_info->geometry=AcquireString(DefaultTileGeometry);
if (image_info->font != (char *) NULL)
montage_info->font=AcquireString(image_info->font);
montage_info->gravity=CenterGravity;
montage_info->pointsize=image_info->pointsize;
montage_info->fill.alpha=OpaqueAlpha;
montage_info->stroke.alpha=(Quantum) TransparentAlpha;
montage_info->matte_color=image_info->matte_color;
montage_info->background_color=image_info->background_color;
montage_info->border_color=image_info->border_color;
montage_info->debug=IsEventLogging();
montage_info->signature=MagickCoreSignature;
}
开发者ID:vcgato29,项目名称:ImageMagick,代码行数:50,代码来源:montage.c
示例5: NewWandViewExtent
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% N e w W a n d V i e w E x t e n t %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% NewWandViewExtent() returns a wand view required for all other methods
% in the Wand View API.
%
% The format of the NewWandViewExtent method is:
%
% WandView *NewWandViewExtent(MagickWand *wand,const ssize_t x,
% const ssize_t y,const size_t width,const size_t height)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
% o x,y,columns,rows: These values define the perimeter of a extent of
% pixel_wands view.
%
*/
WandExport WandView *NewWandViewExtent(MagickWand *wand,const ssize_t x,
const ssize_t y,const size_t width,const size_t height)
{
WandView
*wand_view;
assert(wand != (MagickWand *) NULL);
assert(wand->signature == WandSignature);
wand_view=(WandView *) AcquireMagickMemory(sizeof(*wand_view));
if (wand_view == (WandView *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
(void) ResetMagickMemory(wand_view,0,sizeof(*wand_view));
wand_view->id=AcquireWandId();
(void) FormatLocaleString(wand_view->name,MaxTextExtent,"%s-%.20g",
WandViewId,(double) wand_view->id);
wand_view->description=ConstantString("WandView");
wand_view->view=AcquireCacheView(wand_view->wand->images);
wand_view->wand=wand;
wand_view->extent.width=width;
wand_view->extent.height=height;
wand_view->extent.x=x;
wand_view->extent.y=y;
wand_view->number_threads=GetOpenMPMaximumThreads();
wand_view->exception=AcquireExceptionInfo();
wand_view->pixel_wands=AcquirePixelsThreadSet(wand_view->extent.width,
wand_view->number_threads);
if (wand_view->pixel_wands == (PixelWand ***) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
wand_view->debug=IsEventLogging();
wand_view->signature=WandSignature;
return(wand_view);
}
开发者ID:ikbear,项目名称:ImageMagick,代码行数:61,代码来源:wand-view.c
示例6: NewMagickWand
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% N e w M a g i c k W a n d %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% NewMagickWand() returns a wand required for all other methods in the API.
% A fatal exception is thrown if there is not enough memory to allocate the
% wand. Use DestroyMagickWand() to dispose of the wand when it is no longer
% needed.
%
% The format of the NewMagickWand method is:
%
% MagickWand *NewMagickWand(void)
%
*/
WandExport MagickWand *NewMagickWand(void)
{
const char
*quantum;
MagickWand
*wand;
size_t
depth;
depth=MAGICKCORE_QUANTUM_DEPTH;
quantum=GetMagickQuantumDepth(&depth);
if (depth != MAGICKCORE_QUANTUM_DEPTH)
ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
wand=(MagickWand *) AcquireMagickMemory(sizeof(*wand));
if (wand == (MagickWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
(void) ResetMagickMemory(wand,0,sizeof(*wand));
wand->id=AcquireWandId();
(void) FormatLocaleString(wand->name,MaxTextExtent,"%s-%.20g",MagickWandId,
(double) wand->id);
wand->images=NewImageList();
wand->image_info=AcquireImageInfo();
wand->exception=AcquireExceptionInfo();
wand->debug=IsEventLogging();
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
wand->signature=WandSignature;
return(wand);
}
开发者ID:saitoha,项目名称:ImageMagick-V7-SIXEL,代码行数:53,代码来源:magick-wand.c
示例7: NewImageView
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% N e w I m a g e V i e w %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% NewImageView() returns a image view required for all other methods in the
% Image View API.
%
% The format of the NewImageView method is:
%
% ImageView *NewImageView(MagickCore *wand)
%
% A description of each parameter follows:
%
% o wand: the wand.
%
*/
MagickExport ImageView *NewImageView(Image *image)
{
ImageView
*image_view;
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
image_view=(ImageView *) AcquireMagickMemory(sizeof(*image_view));
if (image_view == (ImageView *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ResetMagickMemory(image_view,0,sizeof(*image_view));
image_view->description=ConstantString("ImageView");
image_view->image=image;
image_view->exception=AcquireExceptionInfo();
image_view->view=AcquireVirtualCacheView(image_view->image,
image_view->exception);
image_view->extent.width=image->columns;
image_view->extent.height=image->rows;
image_view->extent.x=0;
image_view->extent.y=0;
image_view->number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
image_view->debug=IsEventLogging();
image_view->signature=MagickSignature;
return(image_view);
}
开发者ID:Babelz,项目名称:SaNi,代码行数:48,代码来源:image-view.c
示例8: CloneMagickWand
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% C l o n e M a g i c k W a n d %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% CloneMagickWand() makes an exact copy of the specified wand.
%
% The format of the CloneMagickWand method is:
%
% MagickWand *CloneMagickWand(const MagickWand *wand)
%
% A description of each parameter follows:
%
% o wand: The magick wand.
%
*/
WandExport MagickWand *CloneMagickWand(const MagickWand *wand)
{
MagickWand
*clone_wand;
assert(wand != (MagickWand *) NULL);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
clone_wand=(MagickWand *) AcquireMagickMemory(sizeof(*clone_wand));
if (clone_wand == (MagickWand *) NULL)
{
char
*message;
message=GetExceptionMessage(errno);
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
message);
message=DestroyString(message);
}
(void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
clone_wand->id=AcquireWandId();
(void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%lu",
MagickWandId,clone_wand->id);
clone_wand->exception=AcquireExceptionInfo();
InheritException(clone_wand->exception,wand->exception);
clone_wand->image_info=CloneImageInfo(wand->image_info);
clone_wand->quantize_info=CloneQuantizeInfo(wand->quantize_info);
clone_wand->images=CloneImageList(wand->images,clone_wand->exception);
clone_wand->debug=IsEventLogging();
if (clone_wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clone_wand->name);
clone_wand->signature=WandSignature;
return(clone_wand);
}
开发者ID:vazexqi,项目名称:ParsecPipelineParallelism,代码行数:57,代码来源:magick-wand.c
示例9: CloneMagickWand
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% C l o n e M a g i c k W a n d %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% CloneMagickWand() makes an exact copy of the specified wand.
%
% The format of the CloneMagickWand method is:
%
% MagickWand *CloneMagickWand(const MagickWand *wand)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
*/
WandExport MagickWand *CloneMagickWand(const MagickWand *wand)
{
MagickWand
*clone_wand;
assert(wand != (MagickWand *) NULL);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
clone_wand=(MagickWand *) AcquireMagickMemory(sizeof(*clone_wand));
if (clone_wand == (MagickWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
wand->name);
(void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
clone_wand->id=AcquireWandId();
(void) FormatLocaleString(clone_wand->name,MaxTextExtent,"%s-%.20g",
MagickWandId,(double) clone_wand->id);
clone_wand->exception=AcquireExceptionInfo();
InheritException(clone_wand->exception,wand->exception);
clone_wand->image_info=CloneImageInfo(wand->image_info);
clone_wand->images=CloneImageList(wand->images,clone_wand->exception);
clone_wand->insert_before=MagickFalse;
clone_wand->image_pending=MagickFalse;
clone_wand->debug=IsEventLogging();
if (clone_wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clone_wand->name);
clone_wand->signature=WandSignature;
return(clone_wand);
}
开发者ID:saitoha,项目名称:ImageMagick-V7-SIXEL,代码行数:51,代码来源:magick-wand.c
示例10: NewPixelViewRegion
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% N e w P i x e l V i e w R e g i o n %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% NewPixelViewRegion() returns a pixel view required for all other methods
% in the Pixel View API.
%
% The format of the NewPixelViewRegion method is:
%
% PixelView *NewPixelViewRegion(MagickWand *wand,const long x,
% const long y,const unsigned long width,const unsigned long height)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
% o x,y,columns,rows: These values define the perimeter of a region of
% pixel_wands view.
%
*/
WandExport PixelView *NewPixelViewRegion(MagickWand *wand,const long x,
const long y,const unsigned long width,const unsigned long height)
{
PixelView
*pixel_view;
assert(wand != (MagickWand *) NULL);
assert(wand->signature == MagickSignature);
pixel_view=(PixelView *) AcquireMagickMemory(sizeof(*pixel_view));
if (pixel_view == (PixelView *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
(void) ResetMagickMemory(pixel_view,0,sizeof(*pixel_view));
pixel_view->id=AcquireWandId();
(void) FormatMagickString(pixel_view->name,MaxTextExtent,"%s-%lu",
PixelViewId,pixel_view->id);
pixel_view->exception=AcquireExceptionInfo();
pixel_view->view=AcquireCacheView(pixel_view->wand->images);
pixel_view->wand=wand;
pixel_view->region.width=width;
pixel_view->region.height=height;
pixel_view->region.x=x;
pixel_view->region.y=y;
pixel_view->number_threads=GetOpenMPMaximumThreads();
pixel_view->pixel_wands=AcquirePixelsThreadSet(pixel_view->region.width,
pixel_view->number_threads);
if (pixel_view->pixel_wands == (PixelWand ***) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
pixel_view->debug=IsEventLogging();
pixel_view->signature=WandSignature;
return(pixel_view);
}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:60,代码来源:pixel-view.c
示例11: NewMagickWand
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% N e w M a g i c k W a n d %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% NewMagickWand() returns a wand required for all other methods in the API.
%
% The format of the NewMagickWand method is:
%
% MagickWand *NewMagickWand(void)
%
*/
WandExport MagickWand *NewMagickWand(void)
{
const char
*quantum;
MagickWand
*wand;
unsigned long
depth;
depth=QuantumDepth;
quantum=GetMagickQuantumDepth(&depth);
if (depth != QuantumDepth)
ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
wand=(MagickWand *) AcquireMagickMemory(sizeof(*wand));
if (wand == (MagickWand *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
strerror(errno));
(void) ResetMagickMemory(wand,0,sizeof(*wand));
wand->id=AcquireWandId();
(void) FormatMagickString(wand->name,MaxTextExtent,"%s-%lu",MagickWandId,
wand->id);
GetExceptionInfo(&wand->exception);
wand->image_info=CloneImageInfo((ImageInfo *) NULL);
wand->quantize_info=CloneQuantizeInfo((QuantizeInfo *) NULL);
wand->images=NewImageList();
wand->debug=IsEventLogging();
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
wand->signature=MagickSignature;
return(wand);
}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:51,代码来源:magick-wand.c
示例12:
bool Magick::Options::debug ( void ) const
{
if( IsEventLogging() )
{
return true;
}
return false;
}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:8,代码来源:Options.cpp
示例13: GetNextImageRegistry
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% G e t N e x t I m a g e R e g i s t r y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% GetNextImageRegistry() gets the next image registry value.
%
% The format of the GetNextImageRegistry method is:
%
% char *GetNextImageRegistry(void)
%
*/
MagickExport char *GetNextImageRegistry(void)
{
if (IsEventLogging() != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
if (registry == (void *) NULL)
return((char *) NULL);
return((char *) GetNextKeyInSplayTree(registry));
}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:26,代码来源:registry.c
示例14: ResetImageRegistryIterator
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% R e s e t I m a g e R e g i s t r y I t e r a t o r %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ResetImageRegistryIterator() resets the registry iterator. Use it in
% conjunction with GetNextImageRegistry() to iterate over all the values
% in the image registry.
%
% The format of the ResetImageRegistryIterator method is:
%
% ResetImageRegistryIterator(void)
%
*/
MagickExport void ResetImageRegistryIterator(void)
{
if (IsEventLogging() != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
if (registry == (void *) NULL)
return;
ResetSplayTreeIterator(registry);
}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:28,代码来源:registry.c
示例15: RemoveImageRegistry
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% R e m o v e I m a g e R e g i s t r y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% RemoveImageRegistry() removes a key from the image registry and returns its
% value.
%
% The format of the RemoveImageRegistry method is:
%
% void *RemoveImageRegistry(const char *key)
%
% A description of each parameter follows:
%
% o key: the registry.
%
*/
MagickExport void *RemoveImageRegistry(const char *key)
{
if (IsEventLogging() != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",key);
if (registry == (void *) NULL)
return((void *) NULL);
return(RemoveNodeFromSplayTree(registry,key));
}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:31,代码来源:registry.c
示例16: DeleteImageRegistry
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% D e l e t e I m a g e R e g i s t r y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DeleteImageRegistry() deletes a key from the image registry.
%
% The format of the DeleteImageRegistry method is:
%
% MagickBooleanType DeleteImageRegistry(const char *key)
%
% A description of each parameter follows:
%
% o key: the registry.
%
*/
MagickExport MagickBooleanType DeleteImageRegistry(const char *key)
{
if (IsEventLogging() != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",key);
if (registry == (void *) NULL)
return(MagickFalse);
return(DeleteNodeFromSplayTree(registry,key));
}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:30,代码来源:registry.c
示例17: NewPixelRegionIterator
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% N e w P i x e l R e g i o n I t e r a t o r %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% NewPixelRegionIterator() returns a new pixel iterator.
%
% The format of the NewPixelRegionIterator method is:
%
% PixelIterator *NewPixelRegionIterator(MagickWand *wand,const ssize_t x,
% const ssize_t y,const size_t width,const size_t height)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
% o x,y,columns,rows: These values define the perimeter of a region of
% pixels.
%
*/
WandExport PixelIterator *NewPixelRegionIterator(MagickWand *wand,
const ssize_t x,const ssize_t y,const size_t width,const size_t height)
{
CacheView
*view;
const char
*quantum;
ExceptionInfo
*exception;
Image
*image;
PixelIterator
*iterator;
size_t
depth;
assert(wand != (MagickWand *) NULL);
depth=MAGICKCORE_QUANTUM_DEPTH;
quantum=GetMagickQuantumDepth(&depth);
if (depth != MAGICKCORE_QUANTUM_DEPTH)
ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
if ((width == 0) || (width == 0))
ThrowWandFatalException(WandError,"ZeroRegionSize",quantum);
image=GetImageFromMagickWand(wand);
if (image == (Image *) NULL)
return((PixelIterator *) NULL);
exception=AcquireExceptionInfo();
view=AcquireVirtualCacheView(image,exception);
if (view == (CacheView *) NULL)
return((PixelIterator *) NULL);
iterator=(PixelIterator *) AcquireMagickMemory(sizeof(*iterator));
if (iterator == (PixelIterator *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
wand->name);
(void) ResetMagickMemory(iterator,0,sizeof(*iterator));
iterator->id=AcquireWandId();
(void) FormatLocaleString(iterator->name,MaxTextExtent,"%s-%.20g",
PixelIteratorId,(double) iterator->id);
iterator->exception=exception;
iterator->view=view;
SetGeometry(image,&iterator->region);
iterator->region.width=width;
iterator->region.height=height;
iterator->region.x=x;
iterator->region.y=y;
iterator->pixel_wands=NewPixelWands(iterator->region.width);
iterator->y=0;
iterator->debug=IsEventLogging();
if (iterator->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
iterator->signature=WandSignature;
return(iterator);
}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:84,代码来源:pixel-iterator.c
示例18: NewPixelRegionIterator
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% N e w P i x e l R e g i o n I t e r a t o r %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% NewPixelRegionIterator() returns a new pixel iterator.
%
% The format of the NewPixelRegionIterator method is:
%
% PixelIterator NewPixelRegionIterator(MagickWand *wand,const long x,
% const long y,const unsigned long columns,const unsigned long rows,
% const MagickBooleanType modify)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
% o x,y,columns,rows: These values define the perimeter of a region of
% pixels.
%
*/
WandExport PixelIterator *NewPixelRegionIterator(MagickWand *wand,const long x,
const long y,const unsigned long columns,const unsigned long rows)
{
const char
*quantum;
Image
*image;
PixelIterator
*iterator;
unsigned long
depth;
ViewInfo
*view;
assert(wand != (MagickWand *) NULL);
depth=MAGICKCORE_QUANTUM_DEPTH;
quantum=GetMagickQuantumDepth(&depth);
if (depth != MAGICKCORE_QUANTUM_DEPTH)
ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
if ((columns == 0) || (rows == 0))
ThrowWandFatalException(WandError,"ZeroRegionSize",quantum);
image=GetImageFromMagickWand(wand);
if (image == (Image *) NULL)
return((PixelIterator *) NULL);
view=OpenCacheView(image);
if (view == (ViewInfo *) NULL)
return((PixelIterator *) NULL);
iterator=(PixelIterator *) AcquireMagickMemory(sizeof(*iterator));
if (iterator == (PixelIterator *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
wand->name);
(void) ResetMagickMemory(iterator,0,sizeof(*iterator));
iterator->id=AcquireWandId();
(void) FormatMagickString(iterator->name,MaxTextExtent,"%s-%lu",
PixelIteratorId,iterator->id);
iterator->exception=AcquireExceptionInfo();
iterator->view=view;
SetGeometry(image,&iterator->region);
iterator->region.width=columns;
iterator->region.height=rows;
iterator->region.x=x;
iterator->region.y=y;
iterator->pixel_wands=NewPixelWands(iterator->region.width);
iterator->y=0;
iterator->debug=IsEventLogging();
if (iterator->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
iterator->signature=WandSignature;
return(iterator);
}
开发者ID:KiiCorp,项目名称:ImageMagick,代码行数:81,代码来源:pixel-iterator.c
示例19: RegistryComponentTerminus
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% R e g i s t r y C o m p o n e n t T e r m i n u s %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% RegistryComponentTerminus() destroys the registry component.
%
% The format of the DestroyDefines method is:
%
% void RegistryComponentTerminus(void)
%
*/
MagickExport void RegistryComponentTerminus(void)
{
if (registry_semaphore == (SemaphoreInfo *) NULL)
ActivateSemaphoreInfo(®istry_semaphore);
LockSemaphoreInfo(registry_semaphore);
if (IsEventLogging() != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
if (registry != (void *) NULL)
registry=DestroySplayTree(registry);
UnlockSemaphoreInfo(registry_semaphore);
DestroySemaphoreInfo(®istry_semaphore);
}
开发者ID:Babelz,项目名称:SaNi,代码行数:30,代码来源:registry.c
示例20: NewPixelIterator
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% N e w P i x e l I t e r a t o r %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% NewPixelIterator() returns a new pixel iterator.
%
% The format of the NewPixelIterator method is:
%
% PixelIterator *NewPixelIterator(MagickWand *wand)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
*/
WandExport PixelIterator *NewPixelIterator(MagickWand *wand)
{
const char
*quantum;
Image
*image;
PixelIterator
*iterator;
size_t
depth;
CacheView
*view;
depth=MAGICKCORE_QUANTUM_DEPTH;
quantum=GetMagickQuantumDepth(&depth);
if (depth != MAGICKCORE_QUANTUM_DEPTH)
ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
assert(wand != (MagickWand *) NULL);
image=GetImageFromMagickWand(wand);
if (image == (Image *) NULL)
return((PixelIterator *) NULL);
view=AcquireCacheView(image);
if (view == (CacheView *) NULL)
return((PixelIterator *) NULL);
iterator=(PixelIterator *) AcquireMagickMemory(sizeof(*iterator));
if (iterator == (PixelIterator *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
(void) ResetMagickMemory(iterator,0,sizeof(*iterator));
itera
|
请发表评论