locked
Compression of created pictures. RRS feed

  • Question

  • User1680738075 posted

    I have created with asp a picture, but the picture has no good quality.

    Is the compression of the picture to blame for it?

    How can I make the quality better?

     

    Golf-Driver

    Wednesday, December 17, 2008 7:07 AM

Answers

  • User-1181669224 posted
    What format did you save the picture in? If you're saving it as a jpeg, when you call the Save method, there is an overload to pass it an EncoderParameter, which can be constructed to compress the jpeg by a certain percentage. something like this: myImage.Save(path, GetEncoderInfo("image/jpeg"), new EncoderParameter(Encoder.Quality, 100)); Or you could just save it as a PNG or a BMP, if appropriate.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 17, 2008 4:37 PM