// inputGraphicsを拡大・縮小した、新しいグラフィックスデータを生成 int outputGraphics = newGraphics(inputGraphics, outputWidth, outputHeight, true); // trueは滑らかにするための指定