473,698 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TIFF file does not open

I have a web page and there is a link to open a TIFF file. The way I do it is
to have the server code open a binary stream, set the content type to
"image/tiff" and call Response.Binary Write. On the client machine, the file
type TIFF is associated with Kodak Imaging Preview. This app works on most
client machines. When you click on the link, Kodak Imaging Preview will open
the TIFF file on the client machine. However, on some machines, the file
doesn't open. Is there some browser setting that needs to be done for this to
work?

The following C# code is used:

BinaryReader binReader =
new BinaryReader(Fi le.Open(docPath ,
FileMode.Open,F ileAccess.Read) );
byte[] binFile =

binReader.ReadB ytes(Convert.To Int32(binReader .BaseStream.Len gth));

int size = binFile.Length;
size = Convert.ToInt32 (binReader.Base Stream.Length);

Response.Conten tType = "image/tiff";
Response.Binary Write(binFile);
binReader.Close ();

Jan 19 '06 #1
6 10029
Are you sure the default app is set correctly for all machines? What
happens if you have a TIFF on the desktop and you double-click it?

"qysbc" <qy***@discussi ons.microsoft.c om> wrote in message
news:B2******** *************** ***********@mic rosoft.com...
I have a web page and there is a link to open a TIFF file. The way I do it
is
to have the server code open a binary stream, set the content type to
"image/tiff" and call Response.Binary Write. On the client machine, the
file
type TIFF is associated with Kodak Imaging Preview. This app works on most
client machines. When you click on the link, Kodak Imaging Preview will
open
the TIFF file on the client machine. However, on some machines, the file
doesn't open. Is there some browser setting that needs to be done for this
to
work?

The following C# code is used:

BinaryReader binReader =
new BinaryReader(Fi le.Open(docPath ,
FileMode.Open,F ileAccess.Read) );
byte[] binFile =

binReader.ReadB ytes(Convert.To Int32(binReader .BaseStream.Len gth));

int size = binFile.Length;
size = Convert.ToInt32 (binReader.Base Stream.Length);

Response.Conten tType = "image/tiff";
Response.Binary Write(binFile);
binReader.Close ();

Jan 19 '06 #2
The application that opens a given image file format is determined by what
applications are installed on the machine, and by the configuration of the
machine. Windows does not come with a TIFF file viewer. If software is
installed on the machine that can open and view TIFFs, and it is configured
as the default viewer for the image type, it will open. I would suspect that
no application exists on those machines that cannot open it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"qysbc" <qy***@discussi ons.microsoft.c om> wrote in message
news:B2******** *************** ***********@mic rosoft.com...
I have a web page and there is a link to open a TIFF file. The way I do it
is
to have the server code open a binary stream, set the content type to
"image/tiff" and call Response.Binary Write. On the client machine, the
file
type TIFF is associated with Kodak Imaging Preview. This app works on most
client machines. When you click on the link, Kodak Imaging Preview will
open
the TIFF file on the client machine. However, on some machines, the file
doesn't open. Is there some browser setting that needs to be done for this
to
work?

The following C# code is used:

BinaryReader binReader =
new BinaryReader(Fi le.Open(docPath ,
FileMode.Open,F ileAccess.Read) );
byte[] binFile =

binReader.ReadB ytes(Convert.To Int32(binReader .BaseStream.Len gth));

int size = binFile.Length;
size = Convert.ToInt32 (binReader.Base Stream.Length);

Response.Conten tType = "image/tiff";
Response.Binary Write(binFile);
binReader.Close ();

Jan 19 '06 #3
I have checked the client machines and they have Kodak Imaging Preview
installed and TIF/TIFF file type is associated with Kodak Imaging Preview. I
can start Kodak Imaging Preview and open a TIFF file from there. I suspect
there is some other setttings that need to be changed.

"Kevin Spencer" wrote:
The application that opens a given image file format is determined by what
applications are installed on the machine, and by the configuration of the
machine. Windows does not come with a TIFF file viewer. If software is
installed on the machine that can open and view TIFFs, and it is configured
as the default viewer for the image type, it will open. I would suspect that
no application exists on those machines that cannot open it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"qysbc" <qy***@discussi ons.microsoft.c om> wrote in message
news:B2******** *************** ***********@mic rosoft.com...
I have a web page and there is a link to open a TIFF file. The way I do it
is
to have the server code open a binary stream, set the content type to
"image/tiff" and call Response.Binary Write. On the client machine, the
file
type TIFF is associated with Kodak Imaging Preview. This app works on most
client machines. When you click on the link, Kodak Imaging Preview will
open
the TIFF file on the client machine. However, on some machines, the file
doesn't open. Is there some browser setting that needs to be done for this
to
work?

The following C# code is used:

BinaryReader binReader =
new BinaryReader(Fi le.Open(docPath ,
FileMode.Open,F ileAccess.Read) );
byte[] binFile =

binReader.ReadB ytes(Convert.To Int32(binReader .BaseStream.Len gth));

int size = binFile.Length;
size = Convert.ToInt32 (binReader.Base Stream.Length);

Response.Conten tType = "image/tiff";
Response.Binary Write(binFile);
binReader.Close ();


Jan 23 '06 #4
What exactly is happening on these clients?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"qysbc" <qy***@discussi ons.microsoft.c om> wrote in message
news:DC******** *************** ***********@mic rosoft.com...
I have checked the client machines and they have Kodak Imaging Preview
installed and TIF/TIFF file type is associated with Kodak Imaging Preview.
I
can start Kodak Imaging Preview and open a TIFF file from there. I suspect
there is some other setttings that need to be changed.

"Kevin Spencer" wrote:
The application that opens a given image file format is determined by
what
applications are installed on the machine, and by the configuration of
the
machine. Windows does not come with a TIFF file viewer. If software is
installed on the machine that can open and view TIFFs, and it is
configured
as the default viewer for the image type, it will open. I would suspect
that
no application exists on those machines that cannot open it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"qysbc" <qy***@discussi ons.microsoft.c om> wrote in message
news:B2******** *************** ***********@mic rosoft.com...
>I have a web page and there is a link to open a TIFF file. The way I do
>it
>is
> to have the server code open a binary stream, set the content type to
> "image/tiff" and call Response.Binary Write. On the client machine, the
> file
> type TIFF is associated with Kodak Imaging Preview. This app works on
> most
> client machines. When you click on the link, Kodak Imaging Preview will
> open
> the TIFF file on the client machine. However, on some machines, the
> file
> doesn't open. Is there some browser setting that needs to be done for
> this
> to
> work?
>
> The following C# code is used:
>
> BinaryReader binReader =
> new BinaryReader(Fi le.Open(docPath ,
> FileMode.Open,F ileAccess.Read) );
> byte[] binFile =
>
> binReader.ReadB ytes(Convert.To Int32(binReader .BaseStream.Len gth));
>
> int size = binFile.Length;
> size = Convert.ToInt32 (binReader.Base Stream.Length);
>
> Response.Conten tType = "image/tiff";
> Response.Binary Write(binFile);
> binReader.Close ();
>


Jan 23 '06 #5
On most client machines, if you click on the link, a new browser window will
open and the server runs the attached C# code that sends the binary stream to
the browser. The browser window then closes (the opening and closing of the
browser windows takes only a second) and Kodak Imaging Preview opens and
displays the TIFF image.

On the client machines that fails to open the TIFF file, a new browser
window opens and a little image icon is displayed on the window. The browser
window does not close and Kodak Imaging Preview does not open.
"Kevin Spencer" wrote:
What exactly is happening on these clients?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"qysbc" <qy***@discussi ons.microsoft.c om> wrote in message
news:DC******** *************** ***********@mic rosoft.com...
I have checked the client machines and they have Kodak Imaging Preview
installed and TIF/TIFF file type is associated with Kodak Imaging Preview.
I
can start Kodak Imaging Preview and open a TIFF file from there. I suspect
there is some other setttings that need to be changed.

"Kevin Spencer" wrote:
The application that opens a given image file format is determined by
what
applications are installed on the machine, and by the configuration of
the
machine. Windows does not come with a TIFF file viewer. If software is
installed on the machine that can open and view TIFFs, and it is
configured
as the default viewer for the image type, it will open. I would suspect
that
no application exists on those machines that cannot open it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"qysbc" <qy***@discussi ons.microsoft.c om> wrote in message
news:B2******** *************** ***********@mic rosoft.com...
>I have a web page and there is a link to open a TIFF file. The way I do
>it
>is
> to have the server code open a binary stream, set the content type to
> "image/tiff" and call Response.Binary Write. On the client machine, the
> file
> type TIFF is associated with Kodak Imaging Preview. This app works on
> most
> client machines. When you click on the link, Kodak Imaging Preview will
> open
> the TIFF file on the client machine. However, on some machines, the
> file
> doesn't open. Is there some browser setting that needs to be done for
> this
> to
> work?
>
> The following C# code is used:
>
> BinaryReader binReader =
> new BinaryReader(Fi le.Open(docPath ,
> FileMode.Open,F ileAccess.Read) );
> byte[] binFile =
>
> binReader.ReadB ytes(Convert.To Int32(binReader .BaseStream.Len gth));
>
> int size = binFile.Length;
> size = Convert.ToInt32 (binReader.Base Stream.Length);
>
> Response.Conten tType = "image/tiff";
> Response.Binary Write(binFile);
> binReader.Close ();
>


Jan 23 '06 #6
I have figured out the difference between the client machines. The code will
not work if a a browser has plugin to display a TIFF image.

Now, I just open a new window and pass an URL to let a user access a TIFF
file.

Mar 16 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
10026
by: PyPK | last post by:
Hi I am looking for a simple tiff Image reader/writer in python.Can anyone point me to the right one.
0
17973
by: Nicolas Guilhot | last post by:
Hi all ! I have a multi-page Tiff image file that I want to convert to PDF. To do so I am using iText library. The conversion is working, but the code execution is very different according to wich iTextSharp.text.Image.getInstance(...) signature I am using : - using code 1 below, the conversion is fast enough but the resulting PDF file is too big (1 817ko sample Tiff file is converted in less than 30 seconds to a 2 764ko PDF file) -...
0
334
by: Phil | last post by:
Hi I have an issue when trying to stream blob image data from a SQL table to a .aspx page. the code I have works for GIF and JPEG but the images can be multiple pages and we would like them to open in a TIFF format. But since there are invoices with multiple pages, we would like to open as a TIFF format in Windows Picture and Fax Viewer. (or default for TIFF on client). Basically I need to stream this file to the client and then open in...
1
2171
by: ramsin.savra | last post by:
Hi, I'm using same code for opening a TIFF file in VC++ works just fine but under linux it says unable to open the tiff file! Any comment on this? if (argc < 2) { cout << "Not enough parameter" << endl;
6
2967
by: Phil | last post by:
Hi I have an issue when trying to stream blob image data from a SQL table to a .aspx page. the code I have works for GIF and JPEG but the images can be multiple pages and we would like them to open in a TIFF format. What comes back to the screen is garble.... Can anyone help? Thanks The code I am using is: SqlConnection myConn = new SqlConnection(ConfigurationSettings.AppSettings);
3
5823
by: CD | last post by:
An application is logging faxes sent in SQL2000 image column type. I have found code on the net but what it is doing is prompting to save to local which is fine for single page image. Not good for multiple page faxes. I have not been able to locate an example to load in the browser or how to handle multiple image in the one column. 1) Ideally it would be nice to display back in the browser since some may be multiple images. I am not...
5
15004
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
7
3787
by: Ben | last post by:
Hi We are looking for a component that offers that offers the below for Tiff files: Image clean-up (deskew, despeckle) Printing capabilities from VB The ability to add text to image, e.g. time / date Nice to have:
6
6658
by: sternr | last post by:
Hey, When I try to run the following code: System.Drawing.Image tiffImage = System.Drawing.Image.FromFile(@"C: \Image.tiff"); I get an "Out Of Memory" Exception. Does anybody know how can I overcome this problem?
0
8603
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,...
0
9157
Oralloy
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...
1
8893
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,...
1
6518
isladogs
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...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
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...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2328
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.