asked on
imports System.Drawing
imports System.Drawing.Imaging
Dim img As bitmap = Image.FromFile(server.mappath("images/baseimage.png"))
'get a graphics canvas context on the img to draw on
Dim g As Graphics = Graphics.FromImage(img)
'declare a font to use
Dim fnt as New Font("Tahoma", 10)
Dim somebrush As New SolidBrush(Color.White)
'put in whatever value for X and Y you want
g.DrawString("YourText",fnt, somebrush,X,Y)
'save the new image
img.save("somefilename.jpg",ImageFormat.jpeg)
fnt.dispose
somebrush.dispose
ASKER
<div style="position:relative;">
<img src="img/drawing.jpg">
<span id="DimensionA" style="position:absolute;top:3px; left:185px">
<b>A</b>
</span>
<span id="DimensionB" style="position:absolute;top:212px; left:4px;transform: rotate(270deg); transform-origin: left top 0;">
<b>B</b>
</span>
</div>
<fieldset class="form-group">
<label for="FloorWidthA">Floor Width A(X)</label>
<input type="text" class="form-control" id="FloorWidthA" placeholder="Enter in mm">
<!--<small class="text-muted">This is the text for A</small>-->
<label for="FloorWidthB">Floor Width B(X)</label>
<input type="text" class="form-control" id="FloorWidthB" placeholder="Enter in mm">
<!-- <small class="text-muted">This is the text for A</small>-->
</fieldset>
ASKER
ASKER
ASKER
<script type="text/javascript">
$('#tbFloorWidthA').keyup(function() {
$('#DimensionA').val($(this).val());
});
</script>
ASKER
ASKER
ASKER
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
1) generate the image on the server (using updatepanel)
2) use a canvas (not an imag but when user right clicks on it, browser will show "save as image")
3) generate a TIFF image which has native capability to contain overlayed text (no experience coding that)
example code:
1) aspx page
Open in new window
2) html page:
Open in new window