• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AcquireString函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: getHandle

/*
 * Class:     magick_ImageInfo
 * Method:    setImageOption
 * Signature: (Ljava/lang/String;Ljava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_magick_ImageInfo_setImageOption
    (JNIEnv *env, jobject self, jstring option, jstring value)
{                                                                             
    ImageInfo *info = NULL;
    const char *cstr1 = NULL;
    const char *cstr2 = NULL;
                                                                              
    info = (ImageInfo *) getHandle(env, self, "imageInfoHandle", NULL);             
    if (info == NULL) {                                                       
        throwMagickException(env, "Unable to retrieve handle");               
        return;                                                               
    }                                                                         
                                                                              
    cstr1 = (*env)->GetStringUTFChars(env, option, 0);                          
    if (cstr1 == NULL) {                                                       
        throwMagickException(env, "Unable to retrieve Java string chars");    
        return;                                                               
    }                        

    cstr2 = (*env)->GetStringUTFChars(env, value, 0);                          
    if (cstr2 == NULL) {                                                       
        throwMagickException(env, "Unable to retrieve Java string chars");    
        return;                                                               
    }                        
             
    SetImageOption(info, (char *)AcquireString(cstr1), (char *)AcquireString(cstr2));
    
    (*env)->ReleaseStringUTFChars(env, option, cstr1);
    (*env)->ReleaseStringUTFChars(env, value, cstr2);                          
}
开发者ID:VRDate,项目名称:jmagick,代码行数:35,代码来源:magick_ImageInfo.c


示例3: RegisterFAXImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r F A X I m a g e                                           %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterFAXImage() adds attributes for the FAX image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterFAXImage method is:
%
%      RegisterFAXImage(void)
%
*/
ModuleExport void RegisterFAXImage(void)
{
    MagickInfo
    *entry;

    static const char
    *Note=
    {
        "See TIFF format.  Note that FAX machines use non-square pixels which\n"
        "are 1.5 times wider than they are tall but computer displays use\n"
        "square pixels. FAX images may appear to be narrow unless they are\n"
        "explicitly resized using a resize specification of \"150x100%\"."
    };

    entry=SetMagickInfo("FAX");
    entry->decoder=(DecoderHandler *) ReadFAXImage;
    entry->encoder=(EncoderHandler *) WriteFAXImage;
    entry->magick=(MagickHandler *) IsFAX;
    entry->description=AcquireString("Group 3 FAX");
    entry->note=AcquireString(Note);
    entry->module=AcquireString("FAX");
    (void) RegisterMagickInfo(entry);
    entry=SetMagickInfo("G3");
    entry->decoder=(DecoderHandler *) ReadFAXImage;
    entry->encoder=(EncoderHandler *) WriteFAXImage;
    entry->magick=(MagickHandler *) IsFAX;
    entry->adjoin=MagickFalse;
    entry->description=AcquireString("Group 3 FAX");
    entry->module=AcquireString("FAX");
    (void) RegisterMagickInfo(entry);
}
开发者ID:miettal,项目名称:armadillo420_standard_linux314,代码行数:54,代码来源:fax.c


示例4: RegisterSTEGANOImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r S T E G A N O I m a g e                                   %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterSTEGANOImage() adds attributes for the STEGANO image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterSTEGANOImage method is:
%
%      RegisterSTEGANOImage(void)
%
*/
ModuleExport void RegisterSTEGANOImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("STEGANO");
  entry->decoder=(DecoderHandler *) ReadSTEGANOImage;
  entry->description=AcquireString("Steganographic image");
  entry->module=AcquireString("STEGANO");
  (void) RegisterMagickInfo(entry);
}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:34,代码来源:stegano.c


示例5: RegisterCIPImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r C I P I m a g e                                           %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterCIPImage() adds attributes for the CIP IP phone image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterCIPImage method is:
%
%      RegisterCIPImage(void)
%
*/
ModuleExport void RegisterCIPImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("CIP");
  entry->encoder=(EncoderHandler *) WriteCIPImage;
  entry->adjoin=MagickFalse;
  entry->description=AcquireString("Cisco IP phone image format");
  entry->module=AcquireString("CIP");
  (void) RegisterMagickInfo(entry);
}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:35,代码来源:cip.c


示例6: RegisterTILEImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r T I L E I m a g e                                         %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterTILEImage() adds attributes for the TILE image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterTILEImage method is:
%
%      RegisterTILEImage(void)
%
*/
ModuleExport void RegisterTILEImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("TILE");
  entry->decoder=(DecoderHandler *) ReadTILEImage;
  entry->raw=MagickTrue;
  entry->endian_support=MagickTrue;
  entry->description=AcquireString("Tile image with a texture");
  entry->module=AcquireString("TILE");
  (void) RegisterMagickInfo(entry);
}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:36,代码来源:tile.c


示例7: RegisterMVGImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r M V G I m a g e                                           %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterMVGImage() adds attributes for the MVG image format
%  to the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterMVGImage method is:
%
%      RegisterMVGImage(void)
%
*/
ModuleExport void RegisterMVGImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("MVG");
  entry->decoder=(DecoderHandler *) ReadMVGImage;
  entry->encoder=(EncoderHandler *) WriteMVGImage;
  entry->magick=(MagickHandler *) IsMVG;
  entry->adjoin=MagickFalse;
  entry->seekable_stream=MagickTrue;
  entry->description=AcquireString("Magick Vector Graphics");
  entry->module=AcquireString("MVG");
  (void) RegisterMagickInfo(entry);
}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:38,代码来源:mvg.c


示例8: RegisterPLASMAImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r P L A S M A I m a g e                                     %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterPLASMAImage() adds attributes for the Plasma image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterPLASMAImage method is:
%
%      RegisterPLASMAImage(void)
%
*/
ModuleExport void RegisterPLASMAImage(void)
{
    MagickInfo
    *entry;

    entry=SetMagickInfo("PLASMA");
    entry->decoder=(DecoderHandler *) ReadPlasmaImage;
    entry->adjoin=MagickFalse;
    entry->description=AcquireString("Plasma fractal image");
    entry->module=AcquireString("PLASMA");
    (void) RegisterMagickInfo(entry);
    entry=SetMagickInfo("FRACTAL");
    entry->decoder=(DecoderHandler *) ReadPlasmaImage;
    entry->adjoin=MagickFalse;
    entry->description=AcquireString("Plasma fractal image");
    entry->module=AcquireString("PLASMA");
    (void) RegisterMagickInfo(entry);
}
开发者ID:miettal,项目名称:armadillo420_standard_linux314,代码行数:41,代码来源:plasma.c


示例9: setHandleAttribute

/*
 * Set a attribute in a generic handle to string.
 *
 * Input:
 *   env        Java VM environment
 *   attribVar  points to a C string so as to set the value
 *   jstr       Java string for which to set the attrib
 *
 * Output:
 *   attribVar  points to a new C string with content from jstr
 */
void setHandleAttribute(JNIEnv *env, char **attribVar, jstring jstr)
{
    const char *cstr = NULL;
    if (*attribVar != NULL) {
//	RelinquishMagickMemory((void**)attribVar);
    }
    cstr = (*env)->GetStringUTFChars(env, jstr, 0);
    *attribVar = (char *) AcquireString(cstr);
    (*env)->ReleaseStringUTFChars(env, jstr, cstr);
}
开发者ID:271845221,项目名称:Android-ImageMagick,代码行数:21,代码来源:jmagick.c


示例10: ThrowException

MagickExport void ThrowException(ExceptionInfo *exception,
  const ExceptionType severity,const char *reason,const char *description)
{
  assert(exception != (ExceptionInfo *) NULL);
  assert(exception->signature == MagickSignature);
  exception->severity=(ExceptionType) severity;
  MagickFreeMemory(exception->reason);
  if (reason)
    exception->reason=
      AcquireString(GetLocaleExceptionMessage(severity,reason));
  MagickFreeMemory(exception->description);
  if (description)
    exception->description=
      AcquireString(GetLocaleExceptionMessage(severity,description));
  exception->error_number=errno;
  MagickFreeMemory(exception->module);
  MagickFreeMemory(exception->function);
  exception->line=0UL;
  exception->signature=0UL;
  return;
}
开发者ID:hank2015,项目名称:testCMS,代码行数:21,代码来源:error.c


示例11: RegisterMPEGImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r M P E G I m a g e                                         %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterMPEGImage() adds attributes for the MPEG image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterMPEGImage method is:
%
%      RegisterMPEGImage(void)
%
*/
ModuleExport void RegisterMPEGImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("MPEG");
  entry->decoder=(DecoderHandler *) ReadMPEGImage;
  entry->encoder=(EncoderHandler *) WriteMPEGImage;
  entry->magick=(MagickHandler *) IsMPEG;
  entry->blob_support=MagickFalse;
  entry->description=AcquireString("MPEG Video Stream");
  entry->module=AcquireString("MPEG");
  (void) RegisterMagickInfo(entry);
  entry=SetMagickInfo("MPG");
  entry->decoder=(DecoderHandler *) ReadMPEGImage;
  entry->encoder=(EncoderHandler *) WriteMPEGImage;
  entry->magick=(MagickHandler *) IsMPEG;
  entry->blob_support=MagickFalse;
  entry->description=AcquireString("MPEG Video Stream");
  entry->module=AcquireString("MPEG");
  (void) RegisterMagickInfo(entry);
  entry=SetMagickInfo("M2V");
  entry->decoder=(DecoderHandler *) ReadMPEGImage;
  entry->encoder=(EncoderHandler *) WriteMPEGImage;
  entry->magick=(MagickHandler *) IsMPEG;
  entry->blob_support=MagickFalse;
  entry->description=AcquireString("MPEG Video Stream");
  entry->module=AcquireString("MPEG");
  (void) RegisterMagickInfo(entry);
}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:53,代码来源:mpeg.c


示例12: RegisterRGBImage

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   R e g i s t e r R G B I m a g e                                           %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  RegisterRGBImage() adds attributes for the RGB image format to
%  the list of supported formats.  The attributes include the image format
%  tag, a method to read and/or write the format, whether the format
%  supports the saving of more than one frame to the same file or blob,
%  whether the format supports native in-memory I/O, and a brief
%  description of the format.
%
%  The format of the RegisterRGBImage method is:
%
%      RegisterRGBImage(void)
%
*/
ModuleExport void RegisterRGBImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("RGB");
  entry->decoder=(DecoderHandler *) ReadRGBImage;
  entry->encoder=(EncoderHandler *) WriteRGBImage;
  entry->raw=MagickTrue;
  entry->endian_support=MagickTrue;
  entry->description=AcquireString("Raw red, green, and blue samples");
  entry->module=AcquireString("RGB");
  (void) RegisterMagickInfo(entry);
  entry=SetMagickInfo("RGBA");
  entry->decoder=(DecoderHandler *) ReadRGBImage;
  entry->encoder=(EncoderHandler *) WriteRGBImage;
  entry->raw=MagickTrue;
  entry->endian_support=MagickTrue;
  entry->description=AcquireString("Raw red, green, blue, and alpha samples");
  entry->module=AcquireString("RGB");
  (void) RegisterMagickInfo(entry);
  entry=SetMagickInfo("RGBO");
  entry->decoder=(DecoderHandler *) ReadRGBImage;
  entry->encoder=(EncoderHandler *) WriteRGBImage;
  entry->raw=MagickTrue;
  entry->endian_support=MagickTrue;
  entry->description=AcquireString("Raw red, green, blue, and opacity samples");
  entry->module=AcquireString("RGB");
  (void) RegisterMagickInfo(entry);
}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:53,代码来源:rgb.c


示例13: ThrowLoggedException

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   T h r o w L o g g e d E x c e p t i o n                                   %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  ThrowLoggedException() throws an exception with the specified severity code,
%  reason, optional description, source filename, function name, and line
%  number. If logging is enabled, the exception is also logged.
%
%  The format of the ThrowLoggedException method is:
%
%      void ThrowLoggedException(ExceptionInfo *exception,
%        const ExceptionType severity,const char *reason,
%        const char *description,const char *module,
%        const char *function,const unsigned long line
%
%  A description of each parameter follows:
%
%    o exception: The exception.
%
%    o severity: The severity of the exception.
%
%    o reason: The reason of the exception.
%
%    o description: The exception description.
%
%    o filename: The source module filename.
%
%    o function: The function name.
%
%    o line: The line number of the source module.
%
%
*/
MagickExport void ThrowLoggedException(ExceptionInfo *exception,
  const ExceptionType severity,const char *reason,const char *description,
  const char *module,const char *function,const unsigned long line)
{
  assert(exception != (ExceptionInfo *) NULL);
  assert(exception->signature == MagickSignature);
  exception->severity=(ExceptionType) severity;
  MagickFreeMemory(exception->reason);
  if (reason)
    exception->reason=
      AcquireString(GetLocaleExceptionMessage(severity,reason));
  MagickFreeMemory(exception->description);
  if (description)
    exception->description=
      AcquireString(GetLocaleExceptionMessage(severity,description));
  exception->error_number=errno;
  MagickFreeMemory(exception->module);
  if (module)
    exception->module=AcquireString(module);
  MagickFreeMemory(exception->function);
  if (function)
    exception->function=AcquireString(function);
  exception->line=line;
  if (exception->reason)
    {
      if (exception->description)
        (void) LogMagickEvent(severity,module,function,line,"%.1024s (%.1024s)",
                              exception->reason,exception->description );
      else
        (void) LogMagickEvent(severity,module,function,line,"%.1024s",
                              exception->reason);
    }
  else
    {
      (void) LogMagickEvent(severity,module,function,line,
                            "exception contains no reason!");
    }
  return;
}
开发者ID:hank2015,项目名称:testCMS,代码行数:79,代码来源:error.c


示例14: CopyException

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%  C o p y E x c e p t i o n                                                  %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  CopyException() copies exception data from one ExceptionInfo structure
%  to another.
%
%  The format of the CopyException method is:
%
%      void CopyException(ExceptionInfo *copy, const ExceptionInfo *original)
%
%  A description of each parameter follows:
%
%    o copy: The exception to copy to.
%
%    o original: The exception to copy from.
%
*/
MagickExport void CopyException(ExceptionInfo *copy, const ExceptionInfo *original)
{
  assert(copy != (ExceptionInfo *) NULL);
  assert(copy->signature == MagickSignature);
  assert(original != (ExceptionInfo *) NULL);
  assert(original->signature == MagickSignature);
  copy->severity=original->severity;
  MagickFreeMemory(copy->reason);
  if (original->reason)
    copy->reason=AcquireString(original->reason);
  MagickFreeMemory(copy->description);
  if (original->description)
    copy->description=AcquireString(original->description);
  copy->error_number=original->error_number;
  MagickFreeMemory(copy->module);
  if (original->module)
    copy->module=AcquireString(original->module);
  MagickFreeMemory(copy->function);
  if (original->function)
    copy->function=AcquireString(original->function);
  copy->line=original->line;
  return;
}
开发者ID:hank2015,项目名称:testCMS,代码行数:48,代码来源:error.c


示例15: HHVM_METHOD

static bool HHVM_METHOD(ImagickDraw, setResolution,
    double x, double y) {
  auto wand = getDrawingWandResource(Object{this_});
  std::ostringstream density;
  density << x << "x" << y;

  auto drawInfo = PeekDrawingWand(wand->getWand());
  drawInfo->density = AcquireString(density.str().c_str());
  auto drawWand = DrawAllocateWand(drawInfo, nullptr);
  if (drawWand == nullptr) {
    IMAGICKDRAW_THROW("Failed to allocate new DrawingWand structure");
  }
  setWandResource(s_ImagickDraw, Object{this_}, drawWand);
  return true;
}
开发者ID:facebook,项目名称:hhvm,代码行数:15,代码来源:imagickdraw.cpp


示例16: getStringFieldValue

/*
 * Retrieve the string value of the specified field.
 *
 * Input:
 *   env        Java VM environment.
 *   obj        Java object for which the value is to be retrieved.
 *   fieldName  name of the field to be retrieved.
 *   fieldID    if non-null, points to field ID. 0 to request retrieval.
 *
 * Output:
 *   fieldID    if non-null, will contain the field ID.
 *
 * Return:
 *   The string value requested. The caller is responsible for
 *   deallocating this string.
 */
char* getStringFieldValue(JNIEnv *env,
                          jobject obj,
                          const char *fieldName,
                          jfieldID *fieldID)
{
    jclass objClass = 0;
    jfieldID objFieldID = 0;
    jobject stringObj = 0;
    char *stringVal = NULL;
    char *stringCpy = NULL;

    if (fieldID == NULL) {
	objClass = (*env)->GetObjectClass(env, obj);
	if (objClass == 0) {
	    return NULL;
	}
	objFieldID =
            (*env)->GetFieldID(env, objClass, fieldName, "Ljava/lang/String;");
    }
    else if (*fieldID == 0) {
	objClass = (*env)->GetObjectClass(env, obj);
	if (objClass == 0) {
	    return NULL;
	}
	objFieldID = *fieldID =
	    (*env)->GetFieldID(env, objClass, fieldName, "Ljava/lang/String;");
    }
    else {
	objFieldID = *fieldID;
    }
    if (objFieldID == 0) {
	return NULL;
    }
    stringObj = (*env)->GetObjectField(env, obj, objFieldID);
    if (stringObj == NULL) {
        return NULL;
    }
    stringVal = (char *) (*env)->GetStringUTFChars(env, stringObj, 0);
    stringCpy = (char *) AcquireString(stringVal);
    (*env)->ReleaseStringUTFChars(env, stringObj, stringVal);
    return stringCpy;
}
开发者ID:271845221,项目名称:Android-ImageMagick,代码行数:58,代码来源:jmagick.c


示例17: MagickQueryConfigureOption

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   M a g i c k Q u e r y C o n f i g u r e O p t i o n                       %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  MagickQueryConfigureOption() returns the value associated with the specified
%  configure option.
%
%  The format of the MagickQueryConfigureOption function is:
%
%      char *MagickQueryConfigureOption(const char *option)
%
%  A description of each parameter follows:
%
%    o option: the option name.
%
*/
WandExport char *MagickQueryConfigureOption(const char *option)
{
  char
    *value;

  const ConfigureInfo
    **configure_info;

  ExceptionInfo
    *exception;

  size_t
    number_options;

  exception=AcquireExceptionInfo();
  configure_info=GetConfigureInfoList(option,&number_options,exception);
  exception=DestroyExceptionInfo(exception);
  if (configure_info == (const ConfigureInfo **) NULL)
    return((char *) NULL);
  value=AcquireString(configure_info[0]->value);
  configure_info=(const ConfigureInfo **)
    RelinquishMagickMemory((void *) configure_info);
  return(value);
}
开发者ID:saitoha,项目名称:ImageMagick-V7-SIXEL,代码行数:47,代码来源:magick-wand.c


示例18: 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,代码来源:montage.c


示例19: LoadConfigureList

/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
+   L o a d C o n f i g u r e L i s t                                         %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  LoadConfigureList() loads the configure configuration file which provides a
%  mapping between configure attributes and a configure name.
%
%  The format of the LoadConfigureList method is:
%
%      MagickBooleanType LoadConfigureList(const char *xml,const char *filename,
%        const size_t depth,ExceptionInfo *exception)
%
%  A description of each parameter follows:
%
%    o xml:  The configure list in XML format.
%
%    o filename:  The configure list filename.
%
%    o depth: depth of <include /> statements.
%
%    o exception: return any errors or warnings in this structure.
%
*/
static MagickBooleanType LoadConfigureList(const char *xml,const char *filename,
  const size_t depth,ExceptionInfo *exception)
{
  char
    keyword[MaxTextExtent],
    *token;

  ConfigureInfo
    *configure_info;

  const char
    *q;

  MagickBooleanType
    status;

  /*
    Load the configure map file.
  */
  (void) LogMagickEvent(ConfigureEvent,GetMagickModule(),
    "Loading configure file \"%s\" ...",filename);
  if (configure_list == (LinkedListInfo *) NULL)
    {
      configure_list=NewLinkedList(0);
      if (configure_list == (LinkedListInfo *) NULL)
        {
          ThrowFileException(exception,ResourceLimitError,
            "MemoryAllocationFailed",filename);
          return(MagickFalse);
        }
    }
  status=MagickTrue;
  configure_info=(ConfigureInfo *) NULL;
  token=AcquireString((char *) xml);
  for (q=(char *) xml; *q != '\0'; )
  {
    /*
      Interpret XML.
    */
    GetMagickToken(q,&q,token);
    if (*token == '\0')
      break;
    (void) CopyMagickString(keyword,token,MaxTextExtent);
    if (LocaleNCompare(keyword,"<!DOCTYPE",9) == 0)
      {
        /*
          Doctype element.
        */
        while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
          GetMagickToken(q,&q,token);
        continue;
      }
    if (LocaleNCompare(keyword,"<!--",4) == 0)
      {
        /*
          Comment element.
        */
        while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
          GetMagickToken(q,&q,token);
        continue;
      }
    if (LocaleCompare(keyword,"<include") == 0)
      {
        /*
          Include element.
        */
        while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
        {
          (void) CopyMagickString(keyword,token,MaxTextExtent);
          GetMagickToken(q,&q,token);
//.........这里部分代码省略.........
开发者ID:MaximOrlovsky,项目名称:unix-toolbox.js-imagemagick,代码行数:101,代码来源:configure.c


示例20: LoadTypeList

static MagickBooleanType LoadTypeList(const char *xml,const char *filename,
  const size_t depth,ExceptionInfo *exception)
{
  char
    fon 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AcquireVirtualCacheView函数代码示例发布时间:2022-05-30
下一篇:
C++ AcquireSemaphoreInfo函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap