This is a discussion on Converting image from one format to another in C# within the C# Programming forums, part of the Software Development category; Hi Guys, Converting image from one format to another through C#.Lets discuss about this in this thread.Cheers...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi Guys, Converting image from one format to another through C#.Lets discuss about this in this thread.Cheers ![]()
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
| Sponsored Links |
| |||
| Hi, Yes.We could do that by using the following code Code: Image imgInFile=Image.FromFile(strFileName);
imgInFile.Save(strOutFileName,ImageFormat.Bmp);
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
| |||
| Hi Deeban, Actually ,PDF's are not an image format. They are a set of instructions used by Adobe Acrobat to render a document.
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
| |||
| Hi Deepan, Yes.Here is the code to convert pdf to an image. Code: using ( FileStream file = new FileStream( "test.pdf", FileMode.Open,
FileAccess.Read ) )
{
// open the PDF document
Document document = new Document( new BinaryReader( file ) );
// get the first page
Page page = document.Pages[0];
// you must apply a scale to the PDF graphics proportional to the
// resolution
float dpi = 300;
float scale = dpi / 72f;
using ( Bitmap bitmap = new Bitmap( (int) ( scale * page.Width ),
(int) ( scale * page.Height ) ) )
{
// wrap a graphics around the bitmap
Graphics graphics = Graphics.FromImage( bitmap );
// apply the scale that accounts for the resolution
graphics.ScaleTransform( scale, scale );
// do the actual rendering
page.Draw( graphics );
// save the result as a bmp - could be any format
bitmap.Save( "test.bmp", ImageFormat.Bmp );
}
}
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
| |||
| Hi Deeban, RAW image formats are the image formats that are not universally accepted image file formats but that are being used by many camera manufacturers.For example, cr2 image file format.
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
| |||
| Hi, Is there only only unique RAW file format or there are many.If there are so many,can u tell them what are they? Last edited by a.deeban : 02-19-2008 at 08:52 AM. |
| |||
| Hi Deeban, Yes.Different camera manufacturers use different RAW image file formats.For example,
These are few of the known RAW file formats and camera manufacturers.
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
| |||
| Hi Deeban, There are so many RAW files thats available in the Internet.You can have them from the following sites:
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
| |||
| Hi Deeban, There are so many conversion tools available to convert the RAW files to jpeg or png files.U can use them in your application and can convert RAW files.
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
| |||
| Hi Deeban, Though there are many,I can suggest you a simple Image Conversion tool in which we use .Net 2.0 framework .You can get @ Image Conversion Utility in C#
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/c-programming/5233-converting-image-one-format-another-c.html | |||
| Posted By | For | Type | Date |
| DiscussWeb IT Community - Technical Support and Technology Discussions | This thread | Refback | 02-12-2008 09:41 PM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert image to other image format using CODEC in .NET 3.0 | Mramesh | C# Programming | 0 | 02-07-2008 02:33 AM |
| Converting a generics List<T> to string[] | oxygen | C# Programming | 4 | 12-21-2007 02:34 AM |
| How to convert jpg, bmp, tif,... image formats in to another format using c# .Net? | Archer | C# Programming | 1 | 09-07-2007 07:23 AM |
| Converting Nikon camera RAW images to JPEG,TIFF files using Adobe dll in C#.NET | oxygen | C# Programming | 5 | 08-16-2007 02:26 AM |
| Better Image Format | Joe | Web Design Help | 12 | 03-06-2007 10:31 PM |