472,353 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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.BinaryWrite. 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(File.Open(docPath,
FileMode.Open,FileAccess.Read));
byte[] binFile =

binReader.ReadBytes(Convert.ToInt32(binReader.Base Stream.Length));

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

Response.ContentType = "image/tiff";
Response.BinaryWrite(binFile);
binReader.Close();

Jan 19 '06 #1
6 9892
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***@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.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.BinaryWrite. 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(File.Open(docPath,
FileMode.Open,FileAccess.Read));
byte[] binFile =

binReader.ReadBytes(Convert.ToInt32(binReader.Base Stream.Length));

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

Response.ContentType = "image/tiff";
Response.BinaryWrite(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***@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.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.BinaryWrite. 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(File.Open(docPath,
FileMode.Open,FileAccess.Read));
byte[] binFile =

binReader.ReadBytes(Convert.ToInt32(binReader.Base Stream.Length));

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

Response.ContentType = "image/tiff";
Response.BinaryWrite(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***@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.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.BinaryWrite. 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(File.Open(docPath,
FileMode.Open,FileAccess.Read));
byte[] binFile =

binReader.ReadBytes(Convert.ToInt32(binReader.Base Stream.Length));

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

Response.ContentType = "image/tiff";
Response.BinaryWrite(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***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.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***@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.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.BinaryWrite. 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(File.Open(docPath,
> FileMode.Open,FileAccess.Read));
> byte[] binFile =
>
> binReader.ReadBytes(Convert.ToInt32(binReader.Base Stream.Length));
>
> int size = binFile.Length;
> size = Convert.ToInt32(binReader.BaseStream.Length);
>
> Response.ContentType = "image/tiff";
> Response.BinaryWrite(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***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.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***@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.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.BinaryWrite. 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(File.Open(docPath,
> FileMode.Open,FileAccess.Read));
> byte[] binFile =
>
> binReader.ReadBytes(Convert.ToInt32(binReader.Base Stream.Length));
>
> int size = binFile.Length;
> size = Convert.ToInt32(binReader.BaseStream.Length);
>
> Response.ContentType = "image/tiff";
> Response.BinaryWrite(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
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
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...
0
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...
1
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...
6
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...
3
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...
5
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...
7
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...
6
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...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.