Skip to content

Commit

Permalink
cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Nov 25, 2022
1 parent de94d35 commit 4cd1cd7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions coders/heic.c
Expand Up @@ -85,7 +85,7 @@
/*
Define declarations.
*/
#define XmpNamespaceExtent 28
#define XMPNamespaceExtent 28

/*
Const declarations.
Expand Down Expand Up @@ -291,13 +291,13 @@ static MagickBooleanType ReadHEICXMPProfile(Image *image,
return(MagickFalse);
error=heif_image_handle_get_metadata(image_handle,id,xmp_profile);
if ((IsHEIFSuccess(image,&error,exception) != MagickFalse) &&
(length > (XmpNamespaceExtent+2)))
(length > (XMPNamespaceExtent+2)))
{
StringInfo
*profile;

length-=(XmpNamespaceExtent+1);
profile=BlobToStringInfo(xmp_profile+XmpNamespaceExtent+1,length);
length-=(XMPNamespaceExtent+1);
profile=BlobToStringInfo(xmp_profile+XMPNamespaceExtent+1,length);
if (profile != (StringInfo*) NULL)
{
(void) SetImageProfile(image,"xmp",profile,exception);
Expand Down Expand Up @@ -898,7 +898,7 @@ static void WriteProfile(struct heif_context *context,Image *image,
{
if (profile != (StringInfo *) NULL)
ConcatenateStringInfo(xmp_profile,profile);
GetStringInfoDatum(xmp_profile)[XmpNamespaceExtent]='\0';
GetStringInfoDatum(xmp_profile)[XMPNamespaceExtent]='\0';
for (i=0; i < (ssize_t) GetStringInfoLength(xmp_profile); i+=65533L)
{
length=MagickMin(GetStringInfoLength(xmp_profile)-i,65533L);
Expand Down
7 changes: 3 additions & 4 deletions coders/jxl.c
Expand Up @@ -530,8 +530,7 @@ static Image *ReadJXLImage(const ImageInfo *image_info,ExceptionInfo *exception)
offset|=(unsigned int) *(p+3);
offset+=4;
if (offset < (size-4))
(void) DestroyStringInfo(SplitStringInfo(exif_profile,(size_t)
offset));
(void) DestroyStringInfo(SplitStringInfo(exif_profile,offset));
}
if (LocaleNCompare(type,"xml ",sizeof(type)) == 0)
{
Expand Down Expand Up @@ -870,8 +869,8 @@ static MagickBooleanType WriteJXLImage(const ImageInfo *image_info,Image *image,
profile=DestroyStringInfo(profile);
}
if (xmp_profile != (StringInfo *) NULL)
(void) JxlEncoderAddBox(jxl_info,"xml ",
GetStringInfoDatum(xmp_profile),GetStringInfoLength(xmp_profile),0);
(void) JxlEncoderAddBox(jxl_info,"xml ",GetStringInfoDatum(xmp_profile),
GetStringInfoLength(xmp_profile),0);
(void) JxlEncoderCloseBoxes(jxl_info);
}
jxl_status=JXLWriteMetadata(image,jxl_info);
Expand Down

0 comments on commit 4cd1cd7

Please sign in to comment.