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

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

where to start? create an image on the fly from other images

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net

Hi all

I hope this is in the right forum thread...

How do I create (or layer) a new image from  2 existing images with ASP.net on the fly?

Does anyone have any examples or links to websites?

or has anyone done this personally? any hints and tips?

also can i put this code (to create it) in a user control? instead of an external page?


View Complete Post

More Related Resource Links

image.save not saving images


I have a piece of code that writes string into an image and save it. It works on one of my site and but not the other. The image.save is not working. If this is a permission problem, which account should I change? I use win server 2003 and IIS 6, and have given ASPNET, NETWORK SERVICE, and anonymous user write access.

Need to upload images with data, but image url's are in separate db table

Hello, I'm making a simple homes classifieds section and when a home ad is created, a HomeID is automatically created for it in the db.  I need the images to upload and enter the associated HomeID with each image automatically.  What I tried isn't working, because it looks like it's looking for the HomeID in the codebehind before it gets entered into the db.ASPX CODE<asp:SqlDataSource ID="SqlDataSource1" runat="server"         ConnectionString="<%$ ConnectionStrings:ConnectionString %>"         InsertCommand="INSERT INTO [Homes] ([UserName], [Street], [Details], [Contact], [Phone], , [Thumb], [Price], [Approved], [Posted]) VALUES (@UserName, @Street, @Details, @Contact, @Phone, @Email, @Thumb, @Price, @Approved, @Posted)"         SelectCommand="SELECT [HomeID], [UserName], [Street], [Details], [Contact], [Phone], , [Thumb], [Price], [Approved], [Posted] FROM [Homes]" >        <InsertParameters>            <asp:Parameter Name="UserName" Type="String" />            <asp:Parameter Name="Street" Type="Str

Datareader: Set multiple random images into appropriate image field

Hi, first of all, sorry if my title isn confusing as i dont really sure the specify description regarding what i wan to do.   Now what i trying to do is, I getting 5 random images from the database, this is the code for me to get random 5 records from database: Dim command As New SqlCommand("SELECT TOP 5 Description,Image,ImageID FROM Properties ORDER BY ImageID", con)  and with the help of image handler to display it to 5 Images components i put in the page, lets say name it "Image1" to "Image5". Now the question is, how do i assign the 5 diff imageID into the 5 image components? Lets say i wan my Image1's imageID is 1, and Image2's imageID is 2. What im doing now is assigning all the same imageID to all 5 images. Below is how i assign the imageIDDim reader As SqlDataReader reader = command.ExecuteReader If reader.HasRows = True Then While reader.Read Image1.ImageUrl = "GetThumbnail.aspx?ImageID=" & reader("ImageID") & " " Image2.ImageUrl = "GetThumbnail.aspx?ImageID=" & reader("ImageID") & " " Image3.ImageUrl = "GetThumbnail.aspx?ImageID=" & reader("ImageID") & " " Image4.ImageUrl = "GetThumbnail.aspx

Posting multiple images to one Image tool

I want to create a if statement which i select an area on a imagemap then the corresponding label discription will appear and corresponding image. The code if what i have so far    Protected Sub ImageMap1_Click(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ImageMapEventArgs) Handles ImageMap1.Click        If e.PostBackValue = "ME" Then            Image1.ImageUrl = "F:\WebSite1\images\one.jpg" & label1.text="Me" <------- How do you join a label and image selection in one if statement i keep getting errors on this and image doesnt load also        ElseIf e.PostBackValue = "Car" Then            Label1.Text = "CAR" & Image1.ImageUrl = "F:\WebSite1\images\two.jpg"        ElseIf e.PostBackValue = "Mysister" Then            Label1.Text = "My sister" &Image1.ImageUrl = "F:\WebSite1\images\two.jpg"        Else            Label1.Text = ""        End If 

create polyline size relative to image clicked



i am creating a path geometry using polyline:


 System.Windows.Point Point1 = new System.Windows.Point(50, 10);
      System.Windows.Point Point2 = new System.Windows.Point(200, 10);
      System.Windows.Point Point3 = new System.Windows.Point(200, 100);
      System.Windows.Point Point4 = new System.Windows.Point(10, 100);
      System.Windows.Point Point5 = new System.Windows.Point(10, 50);
      System.Windows.Point Point6 = new System.Windows.Point(50, 10);
      PointCollection polygonPoints = new PointCollection();
      yellowPolyline.Points = polygonPoints;

this is a rectangle which is clipped from top-left,

actually i want to create dynamically a polyline whose size is relative to the image i click on the canvas 

and then apply than clip that image using that polyline,,so that the image looks clipped from top-left

how can

WPF Listbox with images - default image by default before icon download


I have a wpf ListBox, and each item has an image that the list needs to download from a server - the list definition looks like so:

<ListBox x:Name="List" BorderThickness="0" AlternationCount="2" ItemContainerStyle="{StaticResource alternatingWithBinding}" 
   HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility

How to create a button with image and text


Currently I have button on a form and I need to make buttons image but maintain the click event functions that they have. For instance I have a button that says Update. Is there a way to add an image and put text in that image that says Update and maintain it's functionality. here is the code for the button:

<asp:Button ID="btnUpdate" runat="server" Text="Update" Visible="False" />


Unalbe to create date dimension with fiscal start date 29 Sept

I am trying to create date dimension with 29-Sept as starting date of fiscal year. But the dimension wizard always displays errors related date conversion. The following is the environment I tried.

OS : Windows XP

SQL Server R2

Please help.


Thanks in advance.


Hamlin Stephen

How do I create a dynamic image in report server


I have two questions about report server.

Question 1: Is it wise to 1300 users to make use of reporter server order forms to print / view? or are better solutions?

Question 2: In a report to a dynamic image. The picture is on the Internet. http://www.domainname.com/images/12500.jpg
How can I display dynamic image in the report?
The filename can be retrieved from the database with the order number.

I was thinking something like: http://www.domainname.com/images/ (Fields! Article.Value)
This work, unfortunately.

Does anyone have an idea?

create custom timer job to start a workflow


i have created a project with visual studio, to start every day a workflow on every item in a list.

when i place my code in a webpart and i run the code on 1 item, the workflow will start normally.

when i place my code in the  timer job in the execute method, the timer job will finnish normally but there will be not workflow started.


public override void Execute(Guid contentDbId)

            SPWorkflowManager objWorkflowManager = null;
            SPWorkflowAssociationCollection objWorkflowAssociationCollection = null;

            using (SPSite mySiteCollection = new SPSite(siteurl))
                using (SPWeb mySite = mySiteCollection.OpenWeb())

how to create an image from webservice on desktop application


Hello Partners,

On desktop application I am uploading photos and storing physically on the webserver with the help of webservice and in DB I am storing physical path of that photo.

On the other hand, I want to download the images for later use at that time I am creating bytestream from the physical path and storing it in the dataset column whose datatype is VARBINARY(MAX)

I can return byte array which creates the images on the client side very easily.

The main problem I am facing here is, I am not able to convert the byte array into dataset's VARBINARY format.

I really will be thankful for ur help...

Add images in Image Rotator With the Help FileUpload Control

The article Add images in Image Rotator With the Help FileUpload Control was added by codenickel on Saturday, October 30, 2010.

In case of ImageRotator we can use FileUpload Control To upload my images.Here I use it in a siple way:-Step 1:- we use Image Control (Image1),FileUpload Contol , Button(Button1..)and HiddenField ( for store the FileName), and a Save button to call the

Link images from Image library to Announcement



I have an user requirement to show the Announcement list as a News site (like Channel News) such that whenever user views the announcement the related image should be displayed in the right panel.

Please suggest how to achieve this.


merging two images into one without losing the image quality


Hi Everybody,


I want a functionality of merging two images after reading them without losing the image quality.

Is there new Image classes or libraries introduced in WPF for such kind of requirement.



ASP.Net Create physical image from binary data in Sybase


I want to extract an image from a third party Sybase table which has binary data in it.

To store images they use the following query:

SELECT xp_write_file('C:\photo-1.gz', col_name) FROM tbl_name

What I am trying to do is convert the binary data stored to a actual physical file using .Net

Any help would be appreciated.

cannot create asp.net image control dynamically.

Dear All

I wish to create a series of ASP.net control images in a DIV of a web form. using the ASP.net IMAGE or IMAGE BUTTON object

so far I have:

Dim TargetVignette As Image
TargetVignette = New Image
TargetVignette.Width = 200
TargetVignette.Height = 200
TargetVignette.Visible = True
TargetVignette.ImageUrl = "c:\2010.jpg" 'this is 100 x 75 px
TargetVignette.EnableViewState = True
'TargetVignette.CssClass = "vignette" 'not used yet
Gallery.Controls.Add(New LiteralControl("toto")) 'debug only

Where Gallery is the name of my asp placeholder.

This code DOES Create the Text "TOTO" but does not create image "Targetvignette"

the code works ok with BUTTON object as opposed to Image.

I have manually created a image with the toolbox using exactly the same credential, this displays OK.

it does not catch any exception it just doesnt display anything on the webpage.

I can create all sorts of control but not image

[Image button] is not that
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