|
GetThumbnailImage ()
|
|
10-26-2009, 07:45 PM
Post: #1
|
|||
|
|||
|
Specified an Image entity, you be capable of calling the GetThumbnailImage () technique to cause to be a new Image objective of the dimension you desire. The first two strictures are the width and height, correspondingly. The subsequently two parameters are not used and contain no reason. On the other hand, they should be incorporated because the GetThumbnailImage () method signature necessitate their attendance.
A byte [] with the illustration data is necessary for recurring to the visitor. In view of the fact that the Image object doesn't in a straight line sustain this, Professional Website Design have to carry out a combine translation to get the image information into the appropriate arrangement. Here's the series: generate a Memory Stream entity, save the representation object into the Memory Stream and Write the Memory Stream into a byte array. The code subsequent to the GetThumbnailImage () technique call is observation to reproduce these steps. Keep in mind to set the contented Type possessions of the Response entity before sending the byte [] back to the visitor. In Listing 3, I solid coded this. If an application works with multiple image types, you can handle this by (1) parsing the extension from the file name or (2) checking the raw arrangement material goods of the Image object, which proceeds an Image format object. |
|||
|
« Next Oldest | Next Newest »
|




