GeniuSxBoY Suspended 16786 Posts user info edit post |
Dear Fred,
Is there a reason why non-premmies can't resize pictures?
Perhaps can you let us resize pictures in a top secret querystring way like this?
[.image]http://www.url.com/randomimage.jpg?h=200?w=200[/image]
You can even set limits to 1000 so that people don't do h=200000.
The reason I'm requesting this is so I can make naturally supersized 2400x2400 pictures into a more pleasurable 300x300 experience
I noticed the difference between .jpg and .JPG which was a GREAT IDEA! but sometimes thumbnail is too small and regular size is too big :/
Pretty please with a cherry on top 5/1/2011 4:27:29 PM |
aaronburro Sup, B 53068 Posts user info edit post |
pay yer god damned 5 bux 5/1/2011 4:54:30 PM |
AstralAdvent All American 9999 Posts user info edit post |
$10
I'm AstralAdvent and i approved this message./] 5/1/2011 5:11:57 PM |
Ernie All American 45943 Posts user info edit post |
herp
[Edited on May 1, 2011 at 6:09 PM. Reason : derp] 5/1/2011 6:09:33 PM |
kiljadn All American 44690 Posts user info edit post |
public void ResizeImage(double scaleFactor, Stream fromStream, Stream toStream) { var image = Image.FromStream(fromStream); var newWidth = (int)(image.Width * scaleFactor); var newHeight = (int)(image.Height * scaleFactor); var thumbnailBitmap = new Bitmap(newWidth, newHeight); var thumbnailGraph = Graphics.FromImage(thumbnailBitmap); thumbnailGraph.CompositingQuality = CompositingQuality.HighQuality; thumbnailGraph.SmoothingMode = SmoothingMode.HighQuality; thumbnailGraph.InterpolationMode = InterpolationMode.HighQualityBicubic; var imageRectangle = new Rectangle(0, 0, newWidth, newHeight); thumbnailGraph.DrawImage(image, imageRectangle); thumbnailBitmap.Save(toStream, image.RawFormat); thumbnailGraph.Dispose(); thumbnailBitmap.Dispose(); image.Dispose(); }
http://weblogs.asp.net/gunnarpeipman/archive/2009/04/02/resizing-images-without-loss-of-quality.aspx5/2/2011 1:34:53 PM |
lewisje All American 9196 Posts user info edit post |
The query string is not the right place to put such parameters; they should go in the tag instead, like [image=h200w200]http://t.es/t.png[/image]
On that note, the link tag would be much more fun if it functioned like the url tag in phpBB, like[link=http://b.it/]bit[/link] would yield bit
[Edited on May 4, 2011 at 5:51 AM. Reason : l.ol5/4/2011 5:49:18 AM |
Chance Suspended 4725 Posts user info edit post |
remove having to give a reason for an edit. Just put some italicized text saying what time it was edited. 5/8/2011 8:43:29 AM |