Hello friends,
Can any body tell me the sample code to convert a Tiff image to a Gif
or Jpeg format. The Resolution of picture is a big concern keeping in
mind.
Hope to get the response from all of you.
Regards,
Pushp 4 50934
Load the file...
Bitmap bm=Bitmap.FromF ile("mypic.tiff ");
save as jpeg...
bm.Save("mypig. jpg",ImageForma t.JPEG);
Saving to GIF is a variation on the theme.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Pushp" <pu*********@gm ail.com> wrote in message
news:46******** *************** ***@posting.goo gle.com... Hello friends,
Can any body tell me the sample code to convert a Tiff image to a Gif or Jpeg format. The Resolution of picture is a big concern keeping in mind.
Hope to get the response from all of you.
Regards, Pushp
Hi !
Bob Powell wrote: Load the file...
Bitmap bm=Bitmap.FromF ile("mypic.tiff ");
Shouldn't that read
Bitmap bm = new Bitmap("mypic.t iff");
? save as jpeg...
bm.Save("mypig. jpg",ImageForma t.JPEG);
But keep in mind that TIFF-files may contain more than one image. Have a
look at Bitmap.SaveAdd.
Actually, FromFile works because its in the base class of Bitmap so either
one will do.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Michael Voss" <mi************ ********@lvrREM OVE.CAPSde> wrote in message
news:42525768$1 @news... Hi !
Bob Powell wrote:
Load the file...
Bitmap bm=Bitmap.FromF ile("mypic.tiff ");
Shouldn't that read
Bitmap bm = new Bitmap("mypic.t iff");
?
save as jpeg...
bm.Save("mypig. jpg",ImageForma t.JPEG);
But keep in mind that TIFF-files may contain more than one image. Have a look at Bitmap.SaveAdd.
Yes. you're correct...
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Michael Voss" <mi************ ********@lvrREM OVE.CAPSde> wrote in message
news:42525768$1 @news... Hi !
Bob Powell wrote:
Load the file...
Bitmap bm=Bitmap.FromF ile("mypic.tiff ");
Shouldn't that read
Bitmap bm = new Bitmap("mypic.t iff");
?
save as jpeg...
bm.Save("mypig. jpg",ImageForma t.JPEG);
But keep in mind that TIFF-files may contain more than one image. Have a look at Bitmap.SaveAdd.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Paul |
last post by:
I have tiff images stored in a sql database as image datatype. Through code,
I will do a select statement on the table and need to output a selected tiff
in my browser. I realize that browsers do not support tiffs, but is there a
way to output it as binary. I have tried every example I can find on the
net and still not getting the result I want. My latest error is a generic
GDI eror. Has anyone accomplished this and can share any code....
|
by: Kevin Myers |
last post by:
Hello,
Please forgive my reposting of this note with hopefully a more relevant
subject line.
On an Access 2000 form under Windows 2000 I would like to use a Kodak Image
Edit Control to display the contents of a TIFF image file. According to the
very limited documentation that I have been able to locate so far, all I
should need to do is to drop the Image Edit Control onto the form in design
mode, set the control's Image property to...
|
by: Kim Schulz |
last post by:
hi
anyone that know some free code to convert ppm to jpeg in c#?
Best regards
Kim Schulz
|
by: Zhao Sheng |
last post by:
http://www.guangmingsoft.com/htmltoimage/help.htm
Html To Image
Html To Image 2.0 Released!
Html To Image help you convert html page from any URL to image or
thumbnails easily and quickly.
Directly save the webpage at a given URL into image in bmp, jpeg, tiff,
gif or png format.
Create thumbnail images from large images.
Batch conversion is supported.
|
by: Sameer Gupta |
last post by:
what are options for opening / handling tiff files in .Net framework ?
which is the best library, namespace ?
Please help
Regards
Sameer Gupta
C# Designer & Developer
Siemens
UK
| |
by: wbsmith |
last post by:
hello all,
i am using python (2.5) with the PIL (latest release), and i
am trying
to read in these 3-d tiff images we have. basically, i am following
some
example code that iterates through the images in the 3-d tiff file
like this:
import Image
|
by: Scott Elgram |
last post by:
Hello everyone,
I'm hoping someone here can pose an alternative that might work better
than what I have created so far. I have a web site that needs to deal with
Multi-Page TIFF images. Primarily they need to be split by page or group of
pages and uploaded into a DB. The code I have currently works alright but
it throws a "Parameter is not valid." error on the line containing this code
"using (Bitmap source = new Bitmap(imgFile))...
|
by: a.mustaq |
last post by:
Hi All,
In my application, I have to display tiff images
stored on server. Please help me in acheaving this.
With Regards,
Mustaq Ahmed.A
|
by: snehal s |
last post by:
How to merge tiff images which may be multipage or single page using C# in VS 2005?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |