If (this. pbmain. image. verticalresolution <200 | this. pbmain. image. horizontalresolution <200)
{
// System. Drawing. Image IMG = system. Drawing. image. fromhbitmap (Bitmap) This. Images [0]). gethbitmap ());
// Float x = IMG. verticalresolution;
// Float y = IMG. horizontalresolution;
Int width = (Bitmap) This. Images [0]). width;
Int Height = (Bitmap) This. Images [0]). height;
If (height> width)
{
Height = 2338;
Length = 1653;
}
Else if (width> height)
{
Height = 1653;
Length = 2338;
}
Bitmap BMP source = new Bitmap (Bitmap) This. Images [0]), width, height );
// Bitmap BMP source = new Bitmap (Bitmap) This. Images [0]);
Int isourcewidth = BMP source. width;
Int isourceheight = BMP source. height;
Float fsourcehorresolution = BMP source. horizontalresolution;
Float fsourceverresolution = BMP source. verticalresolution;
// Image DPI
Float ftargethorresolution = 200;
Float ftargetverresolution = 200;
Bitmap BMP target = new Bitmap (width, height );
Graphics G = graphics. fromimage (BMP target );
G. drawimage (BMP source, 0, 0, isourcewidth, isourceheight );
BMP target. setresolution (ftargethorresolution, ftargetverresolution );
BMP target = pipeline manager. kisharpen (BMP target, (float) 0.7 );
BMP target = pipeline manager. convertto1bbpindexed (BMP target, (float) 0.8 );
BMP target. Save (filename, info, EP );
}