410{
413#if TRANSFORMS_SUPPORTED
417#endif
420#ifdef PROGRESS_REPORT
422#endif
425 int file_index;
426
427
428
430
431
432#ifdef USE_CCOMMAND
434#endif
435
439
440
443
446
447
448
449
450#ifdef NEED_SIGNAL_CATCHER
452#endif
453
454
455
456
457
458
459
460
461
463 jsrcerr.trace_level = jdsterr.trace_level;
464 srcinfo.mem->max_memory_to_use =
dstinfo.mem->max_memory_to_use;
465
466#ifdef TWO_FILE_COMMANDLINE
467
469 if (file_index !=
argc-2) {
470 fprintf(
stderr,
"%s: must name one input and one output file\n",
473 }
475 } else {
476 if (file_index !=
argc-1) {
477 fprintf(
stderr,
"%s: must name one input and one output file\n",
480 }
481 }
482#else
483
484 if (file_index <
argc-1) {
487 }
488#endif
489
490
491 if (file_index <
argc) {
495 }
496 } else {
497
499 }
500
501#if TRANSFORMS_SUPPORTED
502
507 }
511 } else {
513 }
514#endif
515
516#ifdef PROGRESS_REPORT
518#endif
519
520
522
523
525
526
528
529
532 &srcinfo.scale_num, &srcinfo.scale_denom) < 1)
534
535#if TRANSFORMS_SUPPORTED
543 }
544#endif
545
546
547
548
549#if TRANSFORMS_SUPPORTED
550
551
555 }
556#endif
557
558
559 src_coef_arrays = jpeg_read_coefficients(&srcinfo);
560
561#if TRANSFORMS_SUPPORTED
564 }
565#endif
566
567
569
570
571
572
573#if TRANSFORMS_SUPPORTED
574 dst_coef_arrays = jtransform_adjust_parameters(&srcinfo, &
dstinfo,
575 src_coef_arrays,
577#else
578 dst_coef_arrays = src_coef_arrays;
579#endif
580
581
582
583
584
585
586
587
590
591
596 }
597 } else {
598
600 }
601
602
604
605
607
608
609 jpeg_write_coefficients(&
dstinfo, dst_coef_arrays);
610
611
613
614
615#if TRANSFORMS_SUPPORTED
616 jtransform_execute_transformation(&srcinfo, &
dstinfo,
617 src_coef_arrays,
619#endif
620
621
624#if TRANSFORMS_SUPPORTED
628 }
629#endif
632
633
636#if TRANSFORMS_SUPPORTED
639#endif
640
641#ifdef PROGRESS_REPORT
643#endif
644
645
646#if TRANSFORMS_SUPPORTED
648 exit(jsrcerr.num_warnings + jdroperr.num_warnings +
650#endif
651 exit(jsrcerr.num_warnings + jdsterr.num_warnings ?
653 return 0;
654}
static void drop_file(DOS_FS *fs, DOS_FILE *file)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
jpeg_destroy_compress(j_compress_ptr cinfo)
jpeg_finish_compress(j_compress_ptr cinfo)
jpeg_copy_critical_parameters(j_decompress_ptr srcinfo, j_compress_ptr dstinfo)
jpeg_destroy_decompress(j_decompress_ptr cinfo)
jpeg_finish_decompress(j_decompress_ptr cinfo)
jpeg_read_header(j_decompress_ptr cinfo, boolean require_image)
jpeg_stdio_dest(j_compress_ptr cinfo, FILE *outfile)
jpeg_stdio_src(j_decompress_ptr cinfo, FILE *infile)
jpeg_std_error(struct jpeg_error_mgr *err)
#define jpeg_create_decompress(cinfo)
#define jpeg_create_compress(cinfo)
static JCOPY_OPTION copyoption
static char * dropfilename
parse_switches(j_compress_ptr cinfo, int argc, char **argv, int last_file_arg_seen, boolean for_real)
static char * scaleoption
static jpeg_transform_info transformoption
static char * outfilename
static const char * progname
jcopy_markers_setup(j_decompress_ptr srcinfo, JCOPY_OPTION option)
jcopy_markers_execute(j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JCOPY_OPTION option)