Web Forms :: How To Generate A Thumbnail Using Webbrowser
Aug 4, 2010How can i generate a thumbnail in asp.net using webbrowser?
We are using website thumbnails/screenshots as an asset like MarketingAssetExchange.
How can i generate a thumbnail in asp.net using webbrowser?
We are using website thumbnails/screenshots as an asset like MarketingAssetExchange.
I have image in my webpage that it has this property width=250px hight:200 and image size :200KB
i want when i put this image in my page with this Property width:100px and hight:100px image size Automatically change EX:100KB how i can do it ?
how could i dynamically generate few thumbnail of my site's home page and shows them in another page.
View 1 RepliesI have this question posted on Expert Exchange here is a link to that:
[URL]
But here it is in a nut shell.
I have a hyperlinks residing in a gridview some links are to files others to images. That gridview is set in a repeater.
What I'm looking to achieve is when the mouse hovers over a hyperlink that point to a jpeg, jpg or gif I would like to generate a thumbnail to show the user. when mouse leaves the hyperlink get rid of thumbnail.
I stared here:
[URL]
I'm trying to use the onmouseover and the handler found above but no luck.
I used below code for uploading image and show in image control with thumpnail metod for reducing image size:
protected void BtnUpload_Click(object sender, EventArgs e)
{
string path = Server.MapPath(".") + "../image/House/product";
string filename = System.IO.Path.GetFileName(fup1.PostedFile.FileName);
string[] validext = { ".jpg", ".png" };
string ext = System.IO.Path.GetExtension(fup1.PostedFile.FileName);
if (Array.IndexOf(validext, ext.ToLower()) < 0)
[Code]...
It save original image in host, now I want it save image that reduce size with GetThumpnail metod in other place How I can do it?
Refer below threads: [URL] ....
I used code for reducing image size(GenerateThumbnail) in above threads my images were in datalist now I have image in my page that isn't in datalist
<asp:Image ID="Image" runat="server" CssClass="GVimg" style="Height:85px; Width:110px" />
And bind it from database
SqlCommand _cmd1 = new SqlCommand("selectFUP1", _cn);
_cmd1.CommandType = CommandType.StoredProcedure;
_cn.Open(); _cmd1.Parameters.AddWithValue("@Behcode", data);
SqlDataReader _dr = _cmd1.ExecuteReader();
while (_dr.Read()) {
image.ImageUrl = "~/image/house/product/" + _dr["Image2"].ToString();
lblerrorV.Text = " ";
}
_cn.Close();
Now I want use GenerateThumbnail code that was in threads for above code... How I can do it?
i want to generate thumbnail image from big image and store into separate folder.
View 1 RepliesI have a ModalPopupExtender control inside accordin control, users can add images, that I sotre the path in database(sql server) and the actual image in physical address inside web server,I automatically resize the image to thumbnail size in C#, when users first connect to the site,the see the thubmnail version of the image,which is much faster to download,and by clicking the thubnail, the hidden asp:pnael is shown with imzge in full size, I use javascript to unhide the panel and also change the image source to actual image,everything works fine in IE, but in Firefox and Chrome, the first time user clicks on thumbnail can not see the full size image,only after couple of time, they see the full size image? what could be the problem?
I am using asp.net ,C# what is the best way to achieve this?
[Code]....
I found a C# web application that fetchs a thumbnail image of a webpage. It works well, only my site is in vb.net. I used a conversion tool. Windows FORMs doesn't fly, and I get an error. Is there something I can import to get the Webbrowser() to work in my application ? Dim m_Webbrowser as NEW Webrowser is underlined in blue. Also, I have noticed that when I select Show All in my toolobox, alot of tools are greyed out. Specifically under common tools, the webbrowser control is greyed out for a web application but they are available for a project. I want to have a webbrowser control in my website application. (vb.net)Most of the following is also underlined in blue:
WebBrowserDocumentCompletedEventHandler
WebBrowserReadyState
Application
Yeah some people would say "Are you crazy using winforms controls inside asp forms"... and I think they are right. But I would say.. "I'm not the only one!!, take a look" [URL] So... Doing some kind of stuff like the previous link. I did the following:
using System;
using System.Threading;
using System.Windows.Forms;
namespace XXXX.aspx.Print
{
public partial class Drucker : System.Web.UI.Page
{
private ManualResetEvent mre = new ManualResetEvent(false);
protected void Page_Load(object sender, EventArgs e)
{
Threading();
}
private void Threading()
{
Thread t = new Thread(new ThreadStart(GoAhead));
t.SetApartmentState(ApartmentState.STA);
t.Start();
mre.WaitOne();
t.Abort();
}...................................
A requirement of a program I am making is that it can 'print' a given URL into a PDF - the server has a PDF printer installed (and is the default printer), so it's just a matter of printing the page programmaticly, and it seems the best way is to use the WebBrowser control - however, I am running into issues
[Code]....
With the above code, I get a script error 'dialogArguments.___IE_PrintType' is null or not an object' in shdoclc.dll/preview.dlg. If I have wb.Print() to somethign like wb.ShowSaveDialog() (or something like that, can't remember exactly), I notice the 'wb' object's document is a blank page, with just <html> tags and named 'about:blank'. But strangely, almost identical code (without the threading bit in the page_load method) works perfect in a normal Winforms based application.
I can't display some controls in the webbrowser such as MultiView, Menu, SiteMapPath or TreeView, is only white screen.
Other controls work. And some controls properties are restricted, I haven't full options. Before I used Visual Studio 2008 and I had less problems than now, I have VS 2010.
I tried to use the WebBrowser control in an ASP .NET application:
public BrowserForm()
{
webBrowser1 = new WebBrowser();
webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted);
[Code]....
But still it's not working for me as desired...giving me weired errors like:
Error HRESULT E_FAIL has been returned from a call to a COM component
I'm not an expert of threading or COM but trying to convert a WindowApplication to WebApplication which takes a screenshot of a web page provided a URL. :(
I want to authenticate to linkedIn website and scrape the content in asp.net. In windows application we use windows brwoser control. Is there any anlternate in web application ?
View 1 RepliesI've been using WebBrowser.DrawtoBitmap() in my asp.net page running in separate STA thread to capture web pages as an image. But I found that I'm getting blank images for few sites consistently. I'm aware that the method is not 'officially' supported but it would be nice if someone can provide me any reason or a work around for these blank images issue.
View 3 RepliesIn my windows application I'm loading more than 100 urls in my web browser control one by one in a for loop and need to print them programatically after each URL gets loaded . But, I keep getting the Javascript error for so many URLs. I'm not sure why this error keep coming.
View 2 RepliesI know that this issue has been raised on so many occasion and I am stuck with two options, one being to create a thumbnail folder whenever a picture is uploaded to the server, here I am using a folder with so many subfolder, upon saving on the server folder, I pass in the subfolder name and the file name, to retrieve the image i need the two parameters but also the resize sizes and as such this measure is almost abosulte.
the other way is to resize on the fly when the user is requesting the picture, this is where I have been stuck on and need some guidance. and here is the code
[Code]....
i need to get thumbnail from video files using C#.
View 1 RepliesI have an Image control on my page that should display a thumbnail preview of the actual image. The URL property of this control is assigned through the code-behind using:
imgHolder.URL = @table.Row[0].ItemArray[0].ToString();
Before moving my files to another location, this assignment works fine (The files used to be located inside the application folder). But after moving all files to another drive in the same server, the images don't seem to render any longer. I can upload/download files fine but they just won't display as thumbnails on the page.
Does anyone know a free way of doing this in asp.net?
View 4 Replieshow i can implement thumbnail like facebook?
chose a part of image and show it in profile?
i am uploading images in database and creating thumbnails too. but thumbnails has been storing as same name, i cant understand where is the problem, May you pls help me about this, my thumbnail creation code is
protected void Button1_Click(object sender, EventArgs e)
{
try
[code]...
I've got a series of thumbnail images in a GridView control as well as a Template field for a larger version of the image when the thumbnail is clicked.I'd like to be able to click a thumbnail and update the larger image in the gridview with the appropriate new image.What would be the best (easiest for a newb!) way to do this?I'd like to avoid a whole page refresh and keep it to just the image.
View 4 RepliesI am creating a website similar to youtube, so after uploading videos (that will be in .flv format), a thumbnail has to be captured from that corresponding video.. here i am designing my page using asp.net & c#...
I have got some code from the net, but its working only videos of size 2-3Mb.... how to get my code to work my code for large sized files..
here's my code..
my code in default page(default.aspx.cs)..
its in page load method....
protected void Page_Load(object sender, EventArgs e) {
Class1.GrabSingle_Thumb();
}
code of my class file(class1.cs)...
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
[CODE]....
I have got these code from [URL]...
I have two more links, which may be useful, but as a starter in .net, I am not that capable of understanding that code in the page...
[URL]...
[URL]...
A user will upload the images through FTP in the images folder. So my requirement is when he clicks on the link say for eg [URL] all the images should be displayed in the thumbnail format. What I did is I opened the IIS and over there I selected the directory listing. So when I click on the link [URL] it shows the list of images. But I want this in the thumbnail format.
View 1 Replies