Hi
I am trying to read multipage tiff image but dont know how
I tried to display single page tiff getting error
my code is
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.Drawing.Imaging;
namespace Documentviewer1
{
public partial class _Default : System.Web.UI.Page
{
//string filepath = "";
protected void Page_Load(object sender, EventArgs e)
{
//// filepath = "image\045237302.tif";
string appath = Server.MapPath("/image") + @"\";
string imagename = Request.QueryString["ImageFileName"];
string filename = appath + imagename;
Response.ContentType = "image/tiff";
new Bitmap(filename).Save(Response.OutputStream, ImageFormat.Tiff);
////System.Drawing.Image TheImg = new App.Files.TIF(Request.QueryString["FilePath"]).GetTiffImageThumb(System.Convert.ToInt16(Request.QueryString["Pg"]), System.Convert.ToInt16(Request.QueryString["Height"]),
System.Convert.ToInt16(Request.QueryString["Width"]));//getting error in thisline Parameter not valid
}
}
}
my aspx page is has
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="Documentviewer1._Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
<img alt="" src ="image/045237302.tif" width="200" height="200"/>
</h2>
<p>
To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>.
</p>
<p>
You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&clcid=0x409"
title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
</p>
</asp:Content>
getting error as Parameter not valid.
Can anybody help me to display the image in the browser.
Thanks
Mary Abraham
Mary Sunish