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


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Merge 9 image file into single file in horizontal manner

Posted By: subash     Posted Date: July 28, 2011    Points:5   Category :ASP.Net
Hi ,

i have 9 images which i need to merge into single file in horizontal manner and shown into single web application page.

Regards
Subash


Responses
Author: Dhiraj Ranka             
Posted Date: July 28, 2011     Points: 20   

Hi,

You mean you want to merge 9 images into 1 image horizontally?

Hope this helps.

Thanks & Regards,
Dhiraj Ranka
http://www.twitter.com/dhirajranka | http://www.dhirajranka.com
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

try these for merging two pictures as


http://forums.asp.net/p/1114047/1721970.aspx

http://www.codeproject.com/KB/GDI-plus/bitmapTxtr.aspx

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

u can also try these coding as

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
' Open the images
Dim img1 As New Bitmap("c:\test\1.jpg")//place image here
Dim img2 As New Bitmap("c:\test\2.jpg")

' Create a new image that supports transparency if the original image doesn't.
' You may need to do this for both images, or for neither
' depending on the original pictures
Dim img3 As New Bitmap(img2.Width, img2.Height, Imaging.PixelFormat.Format32bppArgb)
Graphics.FromImage(img3).DrawImage(img2, 0, 0)

' Create a graphics object for the first image
' that we can use to draw the second image with
Dim g As Graphics = Graphics.FromImage(img1)

' Make the second image partially transparent.
' You can skip this step if the image is already transparent.
Dim currentColor As Color
For x As Integer = 0 To img3.Width - 1
For y As Integer = 0 To img3.Height - 1
currentColor = img3.GetPixel(x, y)
' The first number (100) is the amount of transparency
' 0 is totally transparent. 255 is opaque
img3.SetPixel(x, y, Color.FromArgb(100, currentColor.R, currentColor.G, currentColor.B))
Next
Next

' Draw the second image overtop of the first.
' The second and third arguments tell where to draw
' the top-left corner of the image in relation to the
' first image
g.DrawImage(img3, 0, 0)

' Save the image to a memory stream so we can
' write it back out.
Dim imgStream As New MemoryStream()
img1.Save(imgStream, Imaging.ImageFormat.Jpeg)

' Write the image to the web browser
Response.ContentType = "image/jpeg"
Response.BinaryWrite(imgStream.ToArray())

'Cleanup
imgStream.Close()
imgStream.Dispose()
img1.Dispose()
img2.Dispose()
img3.Dispose()
g.Dispose()

' Make sure the web page doesn't write out anything
' other than the image
Response.End()
End Sub


Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Sasi Prabhu             
Posted Date: July 29, 2011     Points: 20   

Refer :

http://social.msdn.microsoft.com/Forums/en-us/csharplanguage/threads


http://forums.asp.net/t/1199096.aspx/1


http://www.mindfiresolutions.com/Document-merging-in-CNET-734.php

Thanks & Regards,
Sasi Prabhu.
Author: Ravi Ranjan Kumar             
Posted Date: July 31, 2011     Points: 20   

Not Clear. what do you mean my merging. please show your effort. whatever you can use table control and resides images control in table row that can help you merger Images in your webpages.

please feel free to revert back with a specific question.

Thanks & Regards
Ravi Ranjan Kumar
http://raviranjankr.wordpress.com


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

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