locked
Can't open tiff file RRS feed

  • Question

  • I have an app (multiple html pages and monochrome tiff images ) made with help of HTML5 + CSS3 + JavaScript (jQuery Mobile). When the app was uploaded to a server and opened with phone's browser everything worked fine, i.e. hyperlinks in my html files opened proper tiff files in my phone's built-in photo viewer. But Windows Phone 8 doesn't allow to use html files loaded into a phone and its SDCard so I was forced to make a xap file of my app using VS Express 2012 and PhoneGap. But when I started to test it on my unlocked phone (Nokia Lumia 520) tiff files couldn't be opened. 'cause I'am a novice in WinPhone Developing I can't understand what causes this problem.

    P.S. If I use png files instead of tiffs everything works fine. But I can't use png files 'cause their sizes are 4-5 times larger than tiff. For example, a monochrome tiff (4960x3507) is 50Kb and the same png is 215Kb. Another reason is png files are opened in the browser and tiff files are opened in the photoviewer which capabilities to view images is more appropriate to me.

    P.P.S. I tried to make a simple project in VS Express 2012 using Windows Phone HTML5 App template and  made a simple coded html with 2 hyperlinks: one to open TIFF and another one to open PNG file. The result was the same. PNG was opened and TIFF wasn't.

    <!DOCTYPE html>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <link rel="stylesheet" type="text/css" href="/html/css/phone.css" />
            <title>Windows Phone</title>
        </head>
        <body>
            <div>
                <p>My Application</p>
            </div>
            <div id="page-title">
                <p>page name</p>
              <p><a href="tsv5-03.tif">OPEN TIFF</a></p>
              <p>
                <a href="tsv9-01.png">OPEN PNG</a>
              </p>
            </div>
        </body>
    </html>

    What is wrong? Can somebody help me to solve this problem?
    • Edited by berkeshe Thursday, August 1, 2013 12:10 PM
    Wednesday, July 31, 2013 2:29 PM

All replies

  • Does it work if you change the extension of the tif to .png?


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, August 23, 2013 1:42 PM
  • Does it work if you change the extension of the tif to .png?


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Yes, it works.

    I've already wrote about it in my first post:

    P.S. If I use png files instead of tiffs everything works fine.


    • Edited by berkeshe Monday, September 9, 2013 5:40 AM
    Monday, September 9, 2013 5:39 AM
  • You didn't understand the question.  If you have a tiff file that you change to have a .png, you can just rename the tif file and have the smaller file size. 


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, September 9, 2013 12:43 PM
  • English is not my mother tongue. So I could do it. ;-)

    What do you mean saying

    just rename the tif file and have the smaller file size?

    Do you suggest to change extension of a tif file making it png? If yes what for should I do it?

    My question is why when working in the Internet a WinPhone 8 smartphone can open a tiff files and when the same html pages with links to tiffs were converted to a xap application it can't.

    Monday, September 9, 2013 12:53 PM