0

基本的にこれは私がする必要があることです:
製品で変更すると、デスクトップ上の外観が変化し、ロックされた同じフォルダー イメージのように見えるフォルダーがあります。そのため、自動化でこれを検証する必要があります。
したがって、私のアプローチは、この画像を C# .net で取得し、事前に保存されていると予想される画像ファイルと比較することでした。したがって、このイメージを取得する方法に関するヘルプは非常に役立ちます。
メンテナンスが増えるため、サードパーティのツールを使用したくない

可能であれば、他のより良いアプローチも役立ちます。

4

1 に答える 1

0

Previewing Image in ASP.NET Image Control using C# help you to get image from an Image Control Type.

You can save the image in the below way.

Image bitmap = Image.FromFile("C:\\MyFile.bmp");
bitmap.Save("C:\\MyFile2.bmp");

You should be able to use the Save Method from the Image Class and be just fine as shown above. The Save Method has 5 different options or overloads.

  //Saves this Image  to the specified file or stream.
  img.Save(filePath);

  //Saves this image to the specified stream in the specified format.
  img.Save(Stream, ImageFormat);

  //Saves this Image to the specified file in the specified format.
  img.Save(String, ImageFormat);

  //Saves this image to the specified stream, with the specified encoder and image encoder parameters.
  img.Save(Stream, ImageCodecInfo, EncoderParameters);

  //Saves this Image to the specified file, with the specified encoder and image-encoder parameters.
  img.Save(String, ImageCodecInfo, EncoderParameters);
于 2013-06-19T04:12:08.700 に答える