Image

S

shapper

Hello,

Does anyone knows a C# library to manipulate images? Size, resolution,
etc ...

And if possible also check the size and type of an image.

I need to use something like this in my ASP.NET MVC project.

Thanks,

Miguel
 
J

Jeff Johnson

Does anyone knows a C# library to manipulate images? Size, resolution,
etc ...

Adding .drawing to the reply chain. Maybe Bob Powell will have a
suggestion....
 
G

Gregory A. Beamer

Hello,

Does anyone knows a C# library to manipulate images? Size, resolution,
etc ...

And if possible also check the size and type of an image.

I need to use something like this in my ASP.NET MVC project.

Thanks,

Miguel


Basic manipulation can be done in the system.drawing namespace. For the
web it can be problematic, however, as there is only basic support for
gif and jpg (have not checked ping).

There are third party libs, like LeadTools, but they can be a bit pricey
if you are only doing basic image manipulation. I am fairly certain a
search could yield open or shared source libs if you don't need
something this heavy.

From experience, I tried to dynamically create gifs, and the MS
implementation is too limited to be of any real use (pixelation, only
256 color images, etc.). Same for JPG. Both are licensed, so it would
have been more expensive for Microsoft to go beyond the basics.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
A

Arto Viitanen

shapper said:
Hello,

Does anyone knows a C# library to manipulate images? Size, resolution,
etc ...

And if possible also check the size and type of an image.

I need to use something like this in my ASP.NET MVC project.

Thanks,

Miguel

How about ImageMagick's (http://www.imagemagick.org) .NET interface
MagickNet? I have used ImageMagick's cli interface and Java interface
but not the MagickNet, but if it works, it will give all you need and
more.
 
G

Gregory A. Beamer

I don't know what you mean here. JPEG is not limited to 256 colors
(and the GIF limitation is fundamental to the file format, not .NET).

GIF limitation is also set by the algorithm used. When .NET first came out
(or GDI+), I examined the GIF standards (Compuserve has the patent) and
there are different levels of implementation. With .NET, at least in 1.x
(may have changed?), you created a 256 color GIF even if you only had 4
colors. This made it bloated.

Perhaps all of this has now been updated and you can create better images,
but this is the reason I shied away from experimenting further with GDI+
for web work. If it has been improved in 2.x and greater, then I stand
corrected and perhaps should try GDI+ in web apps again?


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top