您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DestroyImageList函数代码示例

51自学网 2021-06-01 20:27:08
  C++
这篇教程C++ DestroyImageList函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DestroyImageList函数的典型用法代码示例。如果您正苦于以下问题:C++ DestroyImageList函数的具体用法?C++ DestroyImageList怎么用?C++ DestroyImageList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DestroyImageList函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ReadICONImage

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%   R e a d I C O N I m a g e                                                 %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  ReadICONImage() reads a Microsoft icon image file and returns it.  It%  allocates the memory necessary for the new Image structure and returns a%  pointer to the new image.%%  The format of the ReadICONImage method is:%%      Image *ReadICONImage(const ImageInfo *image_info,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o image_info: the image info.%%    o exception: return any errors or warnings in this structure.%*/static Image *ReadICONImage(const ImageInfo *image_info,  ExceptionInfo *exception){  IconFile    icon_file;  IconInfo    icon_info;  Image    *image;  MagickBooleanType    status;  register ssize_t    i,    x;  register Quantum    *q;  register unsigned char    *p;  size_t    bit,    byte,    bytes_per_line,    one,    scanline_pad;  ssize_t    count,    offset,    y;  /*    Open image file.  */  assert(image_info != (const ImageInfo *) NULL);  assert(image_info->signature == MagickCoreSignature);  (void) LogMagickEvent(CoderEvent,GetMagickModule(),"%s",image_info->filename);  assert(exception != (ExceptionInfo *) NULL);  assert(exception->signature == MagickCoreSignature);  image=AcquireImage(image_info,exception);  status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);  if (status == MagickFalse)    {      image=DestroyImageList(image);      return((Image *) NULL);    }  icon_file.reserved=(short) ReadBlobLSBShort(image);  icon_file.resource_type=(short) ReadBlobLSBShort(image);  icon_file.count=(short) ReadBlobLSBShort(image);  if ((icon_file.reserved != 0) ||      ((icon_file.resource_type != 1) && (icon_file.resource_type != 2)) ||      (icon_file.count > MaxIcons))    ThrowReaderException(CorruptImageError,"ImproperImageHeader");  for (i=0; i < icon_file.count; i++)  {    icon_file.directory[i].width=(unsigned char) ReadBlobByte(image);    icon_file.directory[i].height=(unsigned char) ReadBlobByte(image);    icon_file.directory[i].colors=(unsigned char) ReadBlobByte(image);    icon_file.directory[i].reserved=(unsigned char) ReadBlobByte(image);    icon_file.directory[i].planes=(unsigned short) ReadBlobLSBShort(image);    icon_file.directory[i].bits_per_pixel=(unsigned short)      ReadBlobLSBShort(image);    icon_file.directory[i].size=ReadBlobLSBLong(image);    icon_file.directory[i].offset=ReadBlobLSBLong(image);    if (EOFBlob(image) != MagickFalse)      {        ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",//.........这里部分代码省略.........
开发者ID:DINKIN,项目名称:ImageMagick,代码行数:101,


示例2: ReadYUVImage

//.........这里部分代码省略.........  vertical_factor=2;  if (image_info->sampling_factor != (char *) NULL)    {      GeometryInfo        geometry_info;      MagickStatusType        flags;      flags=ParseGeometry(image_info->sampling_factor,&geometry_info);      horizontal_factor=(ssize_t) geometry_info.rho;      vertical_factor=(ssize_t) geometry_info.sigma;      if ((flags & SigmaValue) == 0)        vertical_factor=horizontal_factor;      if ((horizontal_factor != 1) && (horizontal_factor != 2) &&          (vertical_factor != 1) && (vertical_factor != 2))        ThrowReaderException(CorruptImageError,"UnexpectedSamplingFactor");    }  if ((interlace == UndefinedInterlace) ||      ((interlace == NoInterlace) && (vertical_factor == 2)))    {      interlace=NoInterlace;    /* CCIR 4:2:2 */      if (vertical_factor == 2)        interlace=PlaneInterlace; /* CCIR 4:1:1 */    }  if (interlace != PartitionInterlace)    {      /*        Open image file.      */      status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);      if (status == MagickFalse)        {          image=DestroyImageList(image);          return((Image *) NULL);        }      if (DiscardBlobBytes(image,image->offset) == MagickFalse)        ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",          image->filename);    }  /*    Allocate memory for a scanline.  */  if (interlace == NoInterlace)    scanline=(unsigned char *) AcquireQuantumMemory((size_t) 2UL*      image->columns+2UL,quantum*sizeof(*scanline));  else    scanline=(unsigned char *) AcquireQuantumMemory((size_t) image->columns,      quantum*sizeof(*scanline));  if (scanline == (unsigned char *) NULL)    ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");  do  {    chroma_image=CloneImage(image,image->columns/horizontal_factor,      image->rows/vertical_factor,MagickTrue,exception);    if (chroma_image == (Image *) NULL)      ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");    /*      Convert raster image to pixel packets.    */    if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0))      if (image->scene >= (image_info->scene+image_info->number_scenes-1))        break;    if (interlace == PartitionInterlace)      {        AppendImageFormat("Y",image->filename);
开发者ID:271845221,项目名称:Android-ImageMagick,代码行数:67,


示例3: assert

MagickExport Image *ChannelFxImage(const Image *image,const char *expression,  ExceptionInfo *exception){#define ChannelFxImageTag  "ChannelFx/Image"  ChannelFx    channel_op;  ChannelType    channel_mask;  char    token[MaxTextExtent];  const char    *p;  const Image    *source_image;  double    pixel;  Image    *destination_image;  MagickBooleanType    status;  PixelChannel    source_channel,    destination_channel;  ssize_t    channels;  assert(image != (Image *) NULL);  assert(image->signature == MagickSignature);  if (image->debug != MagickFalse)    (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);  assert(exception != (ExceptionInfo *) NULL);  assert(exception->signature == MagickSignature);  source_image=image;  destination_image=CloneImage(source_image,0,0,MagickTrue,exception);  if (destination_image == (Image *) NULL)    return((Image *) NULL);  if (expression == (const char *) NULL)    return(destination_image);  destination_channel=RedPixelChannel;  channel_mask=UndefinedChannel;  pixel=0.0;  p=(char *) expression;  GetMagickToken(p,&p,token);  channel_op=ExtractChannelOp;  for (channels=0; *token != '/0'; )  {    ssize_t      i;    /*      Interpret channel expression.    */    switch (*token)    {      case ',':      {        GetMagickToken(p,&p,token);        break;      }      case '|':      {        if (GetNextImageInList(source_image) != (Image *) NULL)          source_image=GetNextImageInList(source_image);        else          source_image=GetFirstImageInList(source_image);        GetMagickToken(p,&p,token);        break;      }      case ';':      {        Image          *canvas;        SetPixelChannelMask(destination_image,channel_mask);        if ((channel_op == ExtractChannelOp) && (channels == 1))          (void) SetImageColorspace(destination_image,GRAYColorspace,exception);        status=SetImageStorageClass(destination_image,DirectClass,exception);        if (status == MagickFalse)          {            destination_image=DestroyImageList(destination_image);            return(destination_image);          }        canvas=CloneImage(source_image,0,0,MagickTrue,exception);        if (canvas == (Image *) NULL)          {            destination_image=DestroyImageList(destination_image);            return(destination_image);          }        AppendImageToList(&destination_image,canvas);        destination_image=GetLastImageInList(destination_image);//.........这里部分代码省略.........
开发者ID:Distrotech,项目名称:ImageMagick,代码行数:101,


示例4: ReadMGKImage

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%   R e a d M G K I m a g e                                                   %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  ReadMGKImage() reads a MGK image file and returns it.  It allocates%  the memory necessary for the new Image structure and returns a pointer to%  the new image.%%  The format of the ReadMGKImage method is:%%      Image *ReadMGKImage(const ImageInfo *image_info,%        ExceptionInfo *exception)%%  A description of each parameter follows:%%    o image_info: the image info.%%    o exception: return any errors or warnings in this structure.%*/static Image *ReadMGKImage(const ImageInfo *image_info,  ExceptionInfo *exception){  char    buffer[MaxTextExtent];  Image    *image;  MagickBooleanType    status;  register ssize_t    x;  register PixelPacket    *q;  register unsigned char    *p;  ssize_t    count,    y;  size_t    columns,    rows;  unsigned char    *pixels;  /*    Open image file.  */  assert(image_info != (const ImageInfo *) NULL);  assert(image_info->signature == MagickSignature);  if (image_info->debug != MagickFalse)    (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",      image_info->filename);  assert(exception != (ExceptionInfo *) NULL);  assert(exception->signature == MagickSignature);  image=AcquireImage(image_info);  status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);  if (status == MagickFalse)    {      image=DestroyImageList(image);      return((Image *) NULL);    }  /*    Read MGK image.  */  (void) ReadBlobString(image,buffer);  /* read magic number */  if (IsMGK(buffer,7) == MagickFalse)    ThrowReaderException(CorruptImageError,"ImproperImageHeader");  (void) ReadBlobString(image,buffer);  count=(ssize_t) sscanf(buffer,"%lu %lu/n",&columns,&rows);  if (count <= 0)    ThrowReaderException(CorruptImageError,"ImproperImageHeader");  do  {    /*      Initialize image structure.    */    image->columns=columns;    image->rows=rows;    image->depth=8;    if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0))      if (image->scene >= (image_info->scene+image_info->number_scenes-1))        break;    /*      Convert MGK raster image to pixel packets.    *///.........这里部分代码省略.........
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:101,


示例5: assert

static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception){  char    *grey,    key[MagickPathExtent],    target[MagickPathExtent],    *xpm_buffer;  Image    *image;  MagickBooleanType    active,    status;  register char    *next,    *p,    *q;  register ssize_t    x;  register Quantum    *r;  size_t    length;  SplayTreeInfo    *xpm_colors;  ssize_t    count,    j,    y;  unsigned long    colors,    columns,    rows,    width;  /*    Open image file.  */  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(exception != (ExceptionInfo *) NULL);  assert(exception->signature == MagickCoreSignature);  image=AcquireImage(image_info,exception);  status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);  if (status == MagickFalse)    {      image=DestroyImageList(image);      return((Image *) NULL);    }  /*    Read XPM file.  */  length=MagickPathExtent;  xpm_buffer=(char *) AcquireQuantumMemory((size_t) length,sizeof(*xpm_buffer));  if (xpm_buffer == (char *) NULL)    ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");  *xpm_buffer='/0';  p=xpm_buffer;  while (ReadBlobString(image,p) != (char *) NULL)  {    if ((*p == '#') && ((p == xpm_buffer) || (*(p-1) == '/n')))      continue;    if ((*p == '}') && (*(p+1) == ';'))      break;    p+=strlen(p);    if ((size_t) (p-xpm_buffer+MagickPathExtent) < length)      continue;    length<<=1;    xpm_buffer=(char *) ResizeQuantumMemory(xpm_buffer,length+MagickPathExtent,      sizeof(*xpm_buffer));    if (xpm_buffer == (char *) NULL)      break;    p=xpm_buffer+strlen(xpm_buffer);  }  if (xpm_buffer == (char *) NULL)    ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");  /*    Remove comments.  */  count=0;  width=0;  for (p=xpm_buffer; *p != '/0'; p++)  {    if (*p != '"')      continue;    count=(ssize_t) sscanf(p+1,"%lu %lu %lu %lu",&columns,&rows,&colors,&width);    image->columns=columns;    image->rows=rows;    image->colors=colors;//.........这里部分代码省略.........
开发者ID:278443820,项目名称:ImageMagick,代码行数:101,


示例6: ReadTTFImage

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%   R e a d T T F I m a g e                                                   %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  ReadTTFImage() reads a TrueType font file and returns it.  It%  allocates the memory necessary for the new Image structure and returns a%  pointer to the new image.%%  The format of the ReadTTFImage method is:%%      Image *ReadTTFImage(const ImageInfo *image_info,ExceptionInfo *exception)%%  A description of each parameter follows:%%    o image_info: the image info.%%    o exception: return any errors or warnings in this structure.%*/static Image *ReadTTFImage(const ImageInfo *image_info,ExceptionInfo *exception){  char    buffer[MaxTextExtent],    *text;  const char    *Text = (char *)      "abcdefghijklmnopqrstuvwxyz/n"      "ABCDEFGHIJKLMNOPQRSTUVWXYZ/n"      "0123456789.:,;(*!?}^)#${%^&[email
C++ DestroyInstance函数代码示例
C++ DestroyImageInfo函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。