using System;
using gdcm;
public class FCTS_JPEG2000
{
public static int Main(string[] args)
{
string filename = args[0];
string outfilename = args[1];
using( var sfcts = FileChangeTransferSyntax.New() )
{
FileChangeTransferSyntax fcts = sfcts.__ref__();
gdcm.TransferSyntax ts = new TransferSyntax( TransferSyntax.TSType.JPEG2000 );
fcts.SetTransferSyntax( ts );
ImageCodec ic = fcts.GetCodec();
JPEG2000Codec jpeg2000 = JPEG2000Codec.Cast( ic );
jpeg2000.SetReversible( false );
jpeg2000.SetQuality(0, 55);
fcts.SetInputFileName( filename );
fcts.SetOutputFileName( outfilename );
if( !fcts.Change() )
{
return 1;
}
}
return 0;
}
}