Answered by:
asp.net GDI+ alternative?

Question
-
User-2106555521 posted
So I'm working on a site that periodically starts getting
Unable to load DLL 'gdiplus.dll': Not enough storage is available to process this command. (Exception from HRESULT: 0x80070008)
and other various GDI ERRORS LIKE
Parser Error Message: The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception.I found this
Which I think is related to the issue and forwarded the hotfix on to the hosting provider but in the header it says
"Using the System.Drawing namespace is strongly discouraged in ASP.NET as it leads to a lot of performance/runtime problems."
I've seen lots of posts where people talk against using GDI+ in asp.net code but I have yet to see an alternative...
Is there one?
I don't need anything that exciting.... My basic business need is
UPLOAD FILE
Check File's dimensions
RESIZE FILE
SAVE FILE AS SMALLER WEB SIZE FRIENDLYAnd that's it
If there's a way to do this without the GDI+ library I'm all ears :-)
Tuesday, August 11, 2009 2:31 PM
Answers
-
User2130758966 posted
There is I-Load from RadActive which is a nice little flash based image upload tool.
You can preview the uploaded image and resize, crop, flip it then export it to as many resizes as you want (fullsize, normal, thumb, icon, etc).
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, August 11, 2009 3:13 PM
All replies
-
User2130758966 posted
There is I-Load from RadActive which is a nice little flash based image upload tool.
You can preview the uploaded image and resize, crop, flip it then export it to as many resizes as you want (fullsize, normal, thumb, icon, etc).
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, August 11, 2009 3:13 PM -
User-2106555521 posted
Yea that's a bit overkill for now :-)
Maybe one day they'll want that but all I need is
Take image
save it smaller
Anything more than that is too much for right now
Shane
Tuesday, August 11, 2009 3:30 PM -
User-2106555521 posted
It's annoying cause I've boiled it down to pretty much nothing
My code looks like this
using (System.Drawing.Image image = System.Drawing.Image.FromStream(fuImage.PostedFile.InputStream))
{
}
And it throws out of memory errors whenever it tries to load a file larger than 1.5 MB
The only solution I can think of right now is don't EVER use startlogic as a hosting provider
Tuesday, August 11, 2009 3:43 PM