这篇教程C++ IsEventLogging函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中IsEventLogging函数的典型用法代码示例。如果您正苦于以下问题:C++ IsEventLogging函数的具体用法?C++ IsEventLogging怎么用?C++ IsEventLogging使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了IsEventLogging函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: returnbool Magick::Options::debug(void) const{ if (IsEventLogging()) return(true); return(false);}
开发者ID:INT2208-ST,项目名称:MyFriend,代码行数:7,
示例2: assertMagickExport 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,
示例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,
示例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,
示例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,
示例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,
示例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,
示例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,
示例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,
示例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,
示例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,
示例12: bool Magick::Options::debug ( void ) const{ if( IsEventLogging() ) { return true; } return false;}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:8,
示例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,
示例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,
示例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,
示例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,
示例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,
示例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,
示例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,
示例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)); iterator->id=AcquireWandId(); (void) FormatMagickString(iterator->name,MaxTextExtent,"%s-%.20g", PixelIteratorId,(double) iterator->id); iterator->exception=AcquireExceptionInfo(); iterator->view=view; SetGeometry(image,&iterator->region); iterator->region.width=image->columns; iterator->region.height=image->rows; iterator->region.x=0; iterator->region.y=0; 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,代码行数:73,
示例21: ClearMagickWand/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% C l e a r M a g i c k W a n d %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ClearMagickWand() clears resources associated with the wand, leaving the% wand blank, and ready to be used for a new set of images.%% The format of the ClearMagickWand method is:%% void ClearMagickWand(MagickWand *wand)%% A description of each parameter follows:%% o wand: the magick wand.%*/WandExport void ClearMagickWand(MagickWand *wand){ assert(wand != (MagickWand *) NULL); assert(wand->signature == WandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); wand->image_info=DestroyImageInfo(wand->image_info); wand->images=DestroyImageList(wand->images); wand->image_info=AcquireImageInfo(); wand->insert_before=MagickFalse; wand->image_pending=MagickFalse; ClearMagickException(wand->exception); wand->debug=IsEventLogging();}
开发者ID:saitoha,项目名称:ImageMagick-V7-SIXEL,代码行数:37,
示例22: ClearPixelIterator/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% C l e a r P i x e l I t e r a t o r %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ClearPixelIterator() clear resources associated with a PixelIterator.%% The format of the ClearPixelIterator method is:%% PixelIterator *ClearPixelIterator(PixelIterator *iterator)%% A description of each parameter follows:%% o iterator: the pixel iterator.%*/WandExport void ClearPixelIterator(PixelIterator *iterator){ assert(iterator != (const PixelIterator *) NULL); assert(iterator->signature == WandSignature); if (iterator->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name); iterator->pixel_wands=DestroyPixelWands(iterator->pixel_wands, iterator->region.width); ClearMagickException(iterator->exception); iterator->pixel_wands=NewPixelWands(iterator->region.width); iterator->active=MagickFalse; iterator->y=0; iterator->debug=IsEventLogging();}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:36,
示例23: ClearMagickWand/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% C l e a r M a g i c k W a n d %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ClearMagickWand() clears resources associated with the wand.%% The format of the ClearMagickWand method is:%% void ClearMagickWand(MagickWand *wand)%% A description of each parameter follows:%% o wand: The magick wand.%%*/WandExport void ClearMagickWand(MagickWand *wand){ assert(wand != (MagickWand *) NULL); assert(wand->signature == MagickSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); wand->quantize_info=DestroyQuantizeInfo(wand->quantize_info); wand->image_info=DestroyImageInfo(wand->image_info); wand->images=DestroyImageList(wand->images); DestroyExceptionInfo(&wand->exception); wand->quantize_info=CloneQuantizeInfo((QuantizeInfo *) NULL); wand->image_info=CloneImageInfo((ImageInfo *) NULL); GetExceptionInfo(&wand->exception); wand->debug=IsEventLogging();}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:38,
示例24: CloneMontageInfo/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% C l o n e M o n t a g e I n f o %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CloneMontageInfo() makes a copy of the given montage info structure. If% NULL is specified, a new image info structure is created initialized to% default values.%% The format of the CloneMontageInfo method is:%% MontageInfo *CloneMontageInfo(const ImageInfo *image_info,% const MontageInfo *montage_info)%% A description of each parameter follows:%% o image_info: the image info.%% o montage_info: the montage info.%*/MagickExport MontageInfo *CloneMontageInfo(const ImageInfo *image_info, const MontageInfo *montage_info){ MontageInfo *clone_info; clone_info=(MontageInfo *) AcquireMagickMemory(sizeof(*clone_info)); if (clone_info == (MontageInfo *) NULL) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); GetMontageInfo(image_info,clone_info); if (montage_info == (MontageInfo *) NULL) return(clone_info); if (montage_info->geometry != (char *) NULL) clone_info->geometry=AcquireString(montage_info->geometry); if (montage_info->tile != (char *) NULL) clone_info->tile=AcquireString(montage_info->tile); if (montage_info->title != (char *) NULL) clone_info->title=AcquireString(montage_info->title); if (montage_info->frame != (char *) NULL) clone_info->frame=AcquireString(montage_info->frame); if (montage_info->texture != (char *) NULL) clone_info->texture=AcquireString(montage_info->texture); if (montage_info->font != (char *) NULL) clone_info->font=AcquireString(montage_info->font); clone_info->pointsize=montage_info->pointsize; clone_info->border_width=montage_info->border_width; clone_info->shadow=montage_info->shadow; clone_info->fill=montage_info->fill; clone_info->stroke=montage_info->stroke; clone_info->background_color=montage_info->background_color; clone_info->border_color=montage_info->border_color; clone_info->matte_color=montage_info->matte_color; clone_info->gravity=montage_info->gravity; (void) CopyMagickString(clone_info->filename,montage_info->filename, MagickPathExtent); clone_info->debug=IsEventLogging(); return(clone_info);}
开发者ID:anorland,项目名称:ImageMagick,代码行数:65,
示例25: AcquireMagickCLI/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ A c q u i r e W a n d C L I %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AcquireMagickCLI() creates a new CLI wand (an expanded form of Magick% Wand). The given image_info and exception is included as is if provided.%% Use DestroyMagickCLI() to dispose of the CLI wand when it is no longer% needed.%% The format of the NewMagickWand method is:%% MagickCLI *AcquireMagickCLI(ImageInfo *image_info,% ExceptionInfo *exception)%*/WandExport MagickCLI *AcquireMagickCLI(ImageInfo *image_info, ExceptionInfo *exception){ MagickCLI *cli_wand; /* precaution - as per NewMagickWand() */ { size_t depth = MAGICKCORE_QUANTUM_DEPTH; const char *quantum = GetMagickQuantumDepth(&depth); if (depth != MAGICKCORE_QUANTUM_DEPTH) ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum); } /* allocate memory for MgaickCLI */ cli_wand=(MagickCLI *) AcquireMagickMemory(sizeof(*cli_wand)); if (cli_wand == (MagickCLI *) NULL) { ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed", GetExceptionMessage(errno)); return((MagickCLI *)NULL); } /* Initialize Wand Part of MagickCLI FUTURE: this is a repeat of code from NewMagickWand() However some parts may be given fro man external source! */ cli_wand->wand.id=AcquireWandId(); (void) FormatLocaleString(cli_wand->wand.name,MaxTextExtent, "%s-%.20g","MagickWandCLI", (double) cli_wand->wand.id); cli_wand->wand.images=NewImageList(); if ( image_info == (ImageInfo *)NULL) cli_wand->wand.image_info=AcquireImageInfo(); else cli_wand->wand.image_info=image_info; if ( exception == (ExceptionInfo *)NULL) cli_wand->wand.exception=AcquireExceptionInfo(); else cli_wand->wand.exception=exception; cli_wand->wand.debug=IsEventLogging(); cli_wand->wand.signature=WandSignature; /* Initialize CLI Part of MagickCLI */ cli_wand->draw_info=CloneDrawInfo(cli_wand->wand.image_info,(DrawInfo *) NULL); cli_wand->quantize_info=AcquireQuantizeInfo(cli_wand->wand.image_info); cli_wand->process_flags=MagickCommandOptionFlags; /* assume "magick" CLI */ cli_wand->command=(const OptionInfo *)NULL; /* no option at this time */ cli_wand->image_list_stack=(Stack *)NULL; cli_wand->image_info_stack=(Stack *)NULL; /* default exception location... EG: sprintf(locaiton, filename, line, column); */ cli_wand->location="from /"%s/""; /* location format using arguments: */ /* filename, line, column */ cli_wand->filename="unknown"; /* script filename, unknown source */ cli_wand->line=0; /* line from script OR CLI argument */ cli_wand->column=0; /* column from script */ cli_wand->signature=WandSignature; if (IfMagickTrue(cli_wand->wand.debug)) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",cli_wand->wand.name); return(cli_wand);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:87,
示例26: assert/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% R e a d T X T I m a g e %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Method ReadTXTImage reads a text file and returns it as an image. It% allocates the memory necessary for the new Image structure and returns a% pointer to the new image.%% The format of the ReadTXTImage method is:%% Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)%% A description of each parameter follows:%% o image: Method ReadTXTImage returns a pointer to the image after% reading. A null image is returned if there is a memory shortage or if% the image cannot be read.%% o image_info: Specifies a pointer to a ImageInfo structure.%% o exception: return any errors or warnings in this structure.%%*/static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception){ char *p, text[MaxTextExtent]; Image *image; TXT_TYPE txt_subformat; MagickPassFail status; MagickBool logging; /* Open image file. */ assert(image_info != (const ImageInfo *) NULL); assert(image_info->signature == MagickSignature); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); logging = IsEventLogging(); image=AllocateImage(image_info); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == False) ThrowReaderException(FileOpenError,UnableToOpenFile,image); p = ReadBlobString(image,text); if (p == NULL) ThrowReaderException(CorruptImageError,ImproperImageHeader,image); txt_subformat = IsTXT((unsigned char *)p,strlen(p)); if (txt_subformat != NO_TXT) { unsigned x, y; unsigned x_min, x_max, y_curr; int ch; unsigned long max, i; char NumOfPlanes; unsigned char *BImgBuff; magick_uint16_t *WImgBuff; magick_uint32_t *DImgBuff; magick_uint32_t R,//.........这里部分代码省略.........
开发者ID:CliffsDover,项目名称:graphicsmagick,代码行数:101,
示例27: SetImageRegistryMagickExport MagickBooleanType SetImageRegistry(const RegistryType type, const char *key,const void *value,ExceptionInfo *exception){ MagickBooleanType status; RegistryInfo *registry_info; void *clone_value; if (IsEventLogging() != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",key); clone_value=(void *) NULL; switch (type) { case StringRegistryType: default: { const char *string; string=(const char *) value; clone_value=(void *) ConstantString(string); break; } case ImageRegistryType: { const Image *image; image=(const Image *) value; if (image->signature != MagickSignature) { (void) ThrowMagickException(exception,GetMagickModule(),RegistryError, "UnableToSetRegistry","%s",key); return(MagickFalse); } clone_value=(void *) CloneImageList(image,exception); break; } case ImageInfoRegistryType: { const ImageInfo *image_info; image_info=(const ImageInfo *) value; if (image_info->signature != MagickSignature) { (void) ThrowMagickException(exception,GetMagickModule(),RegistryError, "UnableToSetRegistry","%s",key); return(MagickFalse); } clone_value=(void *) CloneImageInfo(image_info); break; } } if (clone_value == (void *) NULL) return(MagickFalse); registry_info=(RegistryInfo *) AcquireMagickMemory(sizeof(*registry_info)); if (registry_info == (RegistryInfo *) NULL) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); (void) ResetMagickMemory(registry_info,0,sizeof(*registry_info)); registry_info->type=type; registry_info->value=clone_value; registry_info->signature=MagickSignature; if ((registry == (SplayTreeInfo *) NULL) && (instantiate_registry == MagickFalse)) { if (registry_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(®istry_semaphore); LockSemaphoreInfo(registry_semaphore); if ((registry == (SplayTreeInfo *) NULL) && (instantiate_registry == MagickFalse)) { registry=NewSplayTree(CompareSplayTreeString,RelinquishMagickMemory, DestroyRegistryNode); instantiate_registry=MagickTrue; } UnlockSemaphoreInfo(registry_semaphore); } status=AddValueToSplayTree(registry,ConstantString(key),registry_info); return(status);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:85,
示例28: GetImageRegistry/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% G e t I m a g e R e g i s t r y %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetImageRegistry() returns a value associated with an image registry key.%% The format of the GetImageRegistry method is:%% void *GetImageRegistry(const RegistryType type,const char *key,% ExceptionInfo *exception)%% A description of each parameter follows:%% o type: the type.%% o key: the key.%% o exception: the exception.%*/MagickExport void *GetImageRegistry(const RegistryType type,const char *key, ExceptionInfo *exception){ void *value; RegistryInfo *registry_info; if (IsEventLogging() != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",key); if (registry == (void *) NULL) return((void *) NULL); registry_info=(RegistryInfo *) GetValueFromSplayTree(registry,key); if (registry_info == (void *) NULL) { (void) ThrowMagickException(exception,GetMagickModule(),RegistryError, "UnableToGetRegistryID","`%s'",key); return((void *) NULL); } value=(void *) NULL; switch (type) { case ImageRegistryType: { if (type == registry_info->type) value=(void *) CloneImageList((Image *) registry_info->value,exception); break; } case ImageInfoRegistryType: { if (type == registry_info->type) value=(void *) CloneImageInfo((ImageInfo *) registry_info->value); break; } case StringRegistryType: { switch (registry_info->type) { case ImageRegistryType: { value=(Image *) ConstantString(((Image *) registry_info->value)->filename); break; } case ImageInfoRegistryType: { value=(Image *) ConstantString(((ImageInfo *) registry_info->value)->filename); break; } case StringRegistryType: { value=(void *) ConstantString((char *) registry_info->value); break; } default: break; } break; } default: break; } return(value);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:93,
注:本文中的IsEventLogging函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ IsFeatureLevelSupported函数代码示例 C++ IsErrorTexture函数代码示例 |