more dbg output for jxlsave
This commit is contained in:
parent
633d35f4ae
commit
f4046a95f1
@ -63,11 +63,11 @@
|
|||||||
*
|
*
|
||||||
* - preview image? EXIF? XMP?
|
* - preview image? EXIF? XMP?
|
||||||
*
|
*
|
||||||
* - check scRGB encoding
|
* - check scRGB load
|
||||||
*
|
|
||||||
* - add "shrink" option to read out 8x shrunk image?
|
|
||||||
*
|
*
|
||||||
* - add animation support
|
* - add animation support
|
||||||
|
*
|
||||||
|
* - add "shrink" option to read out 8x shrunk image?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define INPUT_BUFFER_SIZE (4096)
|
#define INPUT_BUFFER_SIZE (4096)
|
||||||
|
@ -62,9 +62,11 @@
|
|||||||
* - libjxl encode only works in one shot mode, so there's no way to write in
|
* - libjxl encode only works in one shot mode, so there's no way to write in
|
||||||
* chunks
|
* chunks
|
||||||
*
|
*
|
||||||
* - embed a preview image? EXIF? XMP? api for this is on the way
|
* - add metadata support EXIF, XMP, etc. api for this is on the way
|
||||||
*
|
*
|
||||||
* - check scRGB encoding
|
* - add animation support
|
||||||
|
*
|
||||||
|
* - libjxl is currently missing error messages (I think)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define OUTPUT_BUFFER_SIZE (4096)
|
#define OUTPUT_BUFFER_SIZE (4096)
|
||||||
@ -128,6 +130,58 @@ vips_foreign_save_jxl_error( VipsForeignSaveJxl *jxl, const char *details )
|
|||||||
vips_error( class->nickname, "%s", details );
|
vips_error( class->nickname, "%s", details );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
static void
|
||||||
|
vips_foreign_save_jxl_print_info( JxlBasicInfo *info )
|
||||||
|
{
|
||||||
|
printf( "JxlBasicInfo:\n" );
|
||||||
|
printf( " xsize = %d\n", info->xsize );
|
||||||
|
printf( " ysize = %d\n", info->ysize );
|
||||||
|
printf( " num_color_channels = %d\n", info->num_color_channels );
|
||||||
|
printf( " num_extra_channels = %d\n", info->num_extra_channels );
|
||||||
|
printf( " bits_per_sample = %d\n", info->bits_per_sample );
|
||||||
|
printf( " exponent_bits_per_sample = %d\n",
|
||||||
|
info->exponent_bits_per_sample );
|
||||||
|
printf( " alpha_bits = %d\n", info->alpha_bits );
|
||||||
|
printf( " alpha_exponent_bits = %d\n", info->alpha_exponent_bits );
|
||||||
|
printf( " intensity_target = %g\n", info->intensity_target );
|
||||||
|
printf( " uses_original_profile = %d\n",
|
||||||
|
info->uses_original_profile );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
vips_foreign_save_jxl_print_format( JxlPixelFormat *format )
|
||||||
|
{
|
||||||
|
printf( "JxlPixelFormat:\n" );
|
||||||
|
printf( " data_type = " );
|
||||||
|
switch( format->data_type ) {
|
||||||
|
case JXL_TYPE_UINT8:
|
||||||
|
printf( "JXL_TYPE_UINT8" );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case JXL_TYPE_UINT16:
|
||||||
|
printf( "JXL_TYPE_UINT16" );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case JXL_TYPE_UINT32:
|
||||||
|
printf( "JXL_TYPE_UINT32" );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case JXL_TYPE_FLOAT:
|
||||||
|
printf( "JXL_TYPE_FLOAT" );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
printf( "(unknown)" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
printf( "\n" );
|
||||||
|
printf( " num_channels = %d\n", format->num_channels );
|
||||||
|
printf( " endianness = %d\n", format->endianness );
|
||||||
|
printf( " align = %zd\n", format->align );
|
||||||
|
}
|
||||||
|
#endif /*DEBUG*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
vips_foreign_save_jxl_build( VipsObject *object )
|
vips_foreign_save_jxl_build( VipsObject *object )
|
||||||
{
|
{
|
||||||
@ -278,7 +332,9 @@ vips_foreign_save_jxl_build( VipsObject *object )
|
|||||||
JxlEncoderOptionsSetLossless( options, jxl->lossless );
|
JxlEncoderOptionsSetLossless( options, jxl->lossless );
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "jxl encode options:\n" );
|
vips_foreign_save_jxl_print_info( &jxl->info );
|
||||||
|
vips_foreign_save_jxl_print_format( &jxl->format );
|
||||||
|
printf( "JxlEncoderOptions:\n" );
|
||||||
printf( " tier = %d\n", jxl->tier );
|
printf( " tier = %d\n", jxl->tier );
|
||||||
printf( " distance = %g\n", jxl->distance );
|
printf( " distance = %g\n", jxl->distance );
|
||||||
printf( " effort = %d\n", jxl->effort );
|
printf( " effort = %d\n", jxl->effort );
|
||||||
|
Loading…
Reference in New Issue
Block a user