.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Why can't I see my jpeg in IE?????

Posted By:      Posted Date: August 23, 2010    Points: 0   Category :ASP.Net

With this link you can't see my JPEG in IE but in Chrome you can just see it, does somebody know why?


View Complete Post

More Related Resource Links

How to insert Image (jpeg) into MS Word Programmatically using VB.NET


Hi there,

Can someone help me on How to insert Image (jpeg) into MS Word Programmatically using VB.NET..not C#.NET??? Sad

I could hardly find any articles for the coding. Preferably using Bookmark...can i have the sample code.



convert jpeg to tiff


Hi all,

I need to comvert jpeg to tiff using c#.net

I have achieved this but problem is image size is increasing drastically. eg: 25 kb of jpeg image is converted to 650 kb of tiff image.

What should be done to have the same image size as of original or atleast double the image size as of original.

Please suggest me. Thanks in advance.

Bad quality after resize jpeg



I wrote code that resize my photo to thumbnail (100x100px). The thumbnail is ok (is blur) on serwer (Windows Serwer 2008 x64) and the thumbnail is very bad (no blur and pixels are big) on serwer (Windows Serwer 2008 x86). Both serwers have framework .net 4.0.

I wrote code on VS 2010.

Below is my code:

public static void MakeThumbnail(string path, string prefix, string filename, Stream stream, string mime, int fixedWidth, int fixedHeight, bool allowCrop)
string newFullname = path + "\\" + prefix + filename;

//oryginalny obrazek
Image sourceOriginalImage = Image.FromStream(stream);

int width = sourceOriginalImage.Width;
int height = sourceOriginalImage.Height;

double widthD = Convert.ToDouble(width);
double heightD = Convert.ToDouble(height);
double fixedWidthD = Convert.ToDouble(fixedWidth);
double fixedHeightD = Convert.ToDouble(fixedHeight);

int newWidth = 0;
int newHeight = 0;

int cropX = 0;
int cropY = 0;

newWidth = fixedWidth;
newHeight = (int)(fixedWidthD / Xp);
cropY = Convert.ToInt32((newHeight -

How to set Page title for Response.ContentType = "image/jpeg"

Hi , how can i set Title for a page with Response.ContentType = "image/jpeg" ? thanks, Naresh

Reading JPEG properties gives Out Of Memory error


I've written some code so that I can select images from the server to display on my web site. It works fine in folders with around 100 images but in one folder which has 400 images I get an Out Of Memory Error. It only reads 144 images then gives the error. Can someone help me find out how I can fix this? Should I be disposing of something in this loop? Or is something else causing the error?


Dim xdt2 As DataTable = myAdsFromXmlFile.Tables(0)
Dim foundRows() As DataRow
Dim dr As DataRow
Dim myCounter As Integer = 0
Dim myCurrentlyUsedImages As Integer = 0
Dim lsErrorLocation As String = ""

   lsErrorLocation = "#3#"
   Label1.Text = ParentDirectory.GetFiles("*.jpg").Length.ToString
   For Each myfile In ParentDirectory.GetFiles("*.jpg")
      myCounter = myCounter + 1
      dr = dt.NewRow()
      fullpath = "/photos/" & Session("sesPhotoCategory") & "/" & Session("sesFolder") & "/" & myfile.Name
      dr("image") = "/photos/" & Session("sesPhotoCategory") & "/" & Session("sesFolder") & "/" & myfile.Name
      dr("fname") = myfile.Name

      Dim currentImage As System.Drawing.Image

Writing an event handler to generate a JPEG thumbnail from a TIFF image


Hi guys,

I'm quite new to programming / development so forgive the rudimentary nature of the question.  I've got a requirement where I need to generate a thumbnail from high resolution TIFF images that are deposited into a SharePoint document library.  Document libraries as far as I can see don't support TIFF images.

I've been advised that I might be able to code an event handler to take the TIFF, generate a JPEG thumbnail, which it can then store in a document library and add to the view in an appropriate column, such as dropping a URL into a picture column.

Now, only having opened VS for XML editing, I'm not sure of the best way to start this.  Any pointers, as such, are gratefully received.



"Parameter is not valid" for tif image(JPEG cpmpressed)


I am agetting the "Parameter is not valid" message while converting the tif image (jpeg compressed) to the Bitmap

FileStream stream =new FileStream(strFilePath, FileMode.Open, FileAccess.Read); 
Bitmap bmp = (Bitmap)Bitmap.FromStream(stream); //here the exception occurs... 



I want to be able to pull all separate images out of a picture and do this via VS 20120 maybe VB, C++, C#, .NET. CONSIDER the following:

 An image file has a picture that contains 3 persons, 1 dogs, 1 cats, a bear, and several trees. I want to create 3 separate image files with 1 person, a tree, and an animal displayed in each image.

 I can do this manually utilizing photo shop or other image processing software But, I want to do it through a program.  Why, well I just want to learn how to identify a specific frame in a photo and do whatever I want with that image file. I am unsure if the image file is made up of frames that isolate each image that makes up a photo?

 It will be challenging and a LEARNING fun task to start from my point of knowledge concerning an image file (which is less then none)  and end up isolating individuals images that make up the story of the photo.

Any thoughts, source concepts, snippets, etc.. would be greatly

Convert TIFF with multiple pages to JPEG or PDF


I want to convert a multipage TIFF file into a JPEG or PDF file.

If I use the Save method of System.Drawing.Image then only the first page of my TIFF file is put into the JPEG. All the other pages are lost.

If there is a way to convert it into a PDF that would also be ok.

Does anyone have an idea/sample?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend