Thursday, April 15, 2010

thumbnail creation

we are getting closer and closer to the end of our ticket. Since we were avoiding loading the entire image when the user only need to preview the image (memory issue), we had to resize the image to make a thumbnail instead. We resized the image by redrawing the original image and assigning new dimensions.

In our new previewComplexObsTag method, we resize the image and save the its thumbnail, with "thumb_" prefix added on the original title of the image. Because they use the Obs Id to get the link to the complex obs image, we added the view to get the thumbnail; so on the normal hyper link of the complex obs image we added "&view=thumbnail" to return the reference of its thumbnail.
Another issue in resizing was keeping the ratio of the image, but Tyler fixed it too.

1 comment: