My site is a directory and I'm really tired of manually fetching each and every thumbnail for each website.
I found this code, but it produces bmp files. I looked at this and I see Bitmap... Is it possible that this can be modified to produce
jpgs? My goal is to get it to get the picture of the site, then resize it and save it into a subdirectory as a jpg file with the to include:
www.domain.com.jpg
That's how all my thumbnails are now. Is this possible given the Bitmap issue? How does Alexa generta the jpg for their files? Do they start with a bmp?
Here's the code:
WebsiteThumnailImage.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WebsiteThumbnailImage.aspx.cs" Inherits="WebsiteThumbnail.WebsiteThumbnailImagePage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Website Thumbnail Image Generator</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td >
<asp:TextBox ID="txtWebsiteAddress" runat="server" Width="415px">www.google.com</asp:TextBox> </td>
<td >
<asp:Button ID="btnShowThumbnailImage" runat="server" Text="Show Thumbnail Image" OnClick="btnShowThumbnailImage_Click" /></td>
</tr>
<tr>
<td>
Width:
<asp:TextBox ID="txtWidth" runat="server">200</asp:TextBox>
Height:
<asp:TextBox ID="txtHeight" runat="server">200</asp:TextBox></td>
<td>
</td>
</tr>
<tr>
<td colspan="2" style="height: 32px">
<asp:Image ID="imgWebsiteThumbnailImage" runat="server" Visible="false"/></td>
</tr>
</table>
</div>
</form>
</body>
</html>
WebsiteThumbnailImage.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.W
View Complete Post