blob: 9df8b967cc974ef790eba8cde968eee59918cdf7 [file] [log] [blame]
// Copyright 2019 Joe Drago. All rights reserved.
// SPDX-License-Identifier: BSD-2-Clause
#include "avifutil.h"
#include <stdio.h>
void avifImageDump(avifImage * avif)
{
printf(" * Resolution : %dx%d\n", avif->width, avif->height);
printf(" * Bit Depth : %d\n", avif->depth);
printf(" * Format : %s\n", avifPixelFormatToString(avif->yuvFormat));
printf(" * Alpha : %s\n", (avif->alphaPlane && (avif->alphaRowBytes > 0)) ? "Present" : "Absent");
switch (avif->profileFormat) {
case AVIF_PROFILE_FORMAT_NONE:
printf(" * Color Profile: None\n");
break;
case AVIF_PROFILE_FORMAT_ICC:
printf(" * Color Profile: ICC (%zu bytes)\n", avif->icc.size);
break;
case AVIF_PROFILE_FORMAT_NCLX:
printf(" * Color Profile: nclx - P:%d / T:%d / M:%d / R:%s\n",
avif->nclx.colourPrimaries,
avif->nclx.transferCharacteristics,
avif->nclx.matrixCoefficients,
avif->nclx.fullRangeFlag ? "full" : "limited");
break;
}
printf("\n");
}
void avifPrintVersions(void)
{
char codecVersions[256];
avifCodecVersions(codecVersions);
printf("Version: %s (%s)\n\n", avifVersion(), codecVersions);
}