Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Reply
asp.net dynamic image [add two images]
Old 01-09-2008, 05:22 PM asp.net dynamic image [add two images]
Extreme Talker

Posts: 176
Trades: 0
I want to have custom smilies that I can use like a regular image.
(head:15x10,mouth:15x4,together:15x14--they will all be separate images)
you choose eyes and mouth(1-6)
url.com/p.aspx?face=1&mouth=4



Do you know how, or know a any tutorials?

Last edited by Skeddles; 01-09-2008 at 05:43 PM..
Skeddles is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-09-2008, 07:45 PM Re: asp.net dynamic image [add two images]
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
I'm really not sure what you're trying to do. Still, here's some C# code that ought to get you pretty close:

Bitmap b = new Bitmap(640, 480);
b.SetPixel(100, 100, Color.FromArgb(128, 128, 128));
b.Save("file.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
Response.Write("<img src='file.jpg' />");

If you have the component images already saved, use those ... the Get and Set -Pixel methods are slow. To do that, you'll need to use the Graphics object, and tell it to draw to an image. This is how double buffering works.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 01-25-2008, 01:25 AM Re: asp.net dynamic image [add two images]
Extreme Talker

Posts: 176
Trades: 0
Code:
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Imaging" %>
<script language="VB" runat="server">

Sub Page_Load(sender As Object, e As EventArgs)
Dim objBitmap As New Bitmap(15,14)
Dim objGraphic as Graphics = Graphics.FromImage(objBitmap)



Response.ContentType = "image/gif"
objBitmap.Save (Response.OutputStream, ImageFormat.Gif)
End Sub

Response.Write("")
</script>
Honestly, I have no clue what i'm doing.

I just want to make an image thats 15x14px, draw 1.gif at (1,1), then draw a.gif at (1,11).


then make it possible to specify the images in the url, like: url.com/dynamicimage.aspx?firstimage=2.gif&secondimage=d.g if
Skeddles is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to asp.net dynamic image [add two images]
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11513 seconds with 12 queries