.NET generates thumbnail

xiaoxiao2021-03-06  198

MemoryStream Stream1 = New MemoryStream ((Byte []) Detail.Image); // Take the picture data stream, you read the file first.

System.drawing.image tempimg = system.drawing.image.fromstream (stream1); // Transfer to a picture class

System.drawing.Image mythumbnail = Tempimg.getthumbnailimage (width, height, null, intptr.zero); // Thumbnail, width, Height you want to define a size

Mythumbnail.save (response.outputstream, Tempimg.rawFormat); // Display

转载请注明原文地址:https://www.9cbs.com/read-128857.html

New Post(0)