LEADTOOLS Support
General
General Questions
Beginner: Loading Image VB.NET ASP 2.0 VS 2005
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, November 15, 2007 12:26:06 AM(UTC)
Groups: Registered
Posts: 1
Hi
Please can you help
I am trying to evaluate your software and attempting the following project,
1) Open existing CMYK Tif Image
2) Add a ‘Hello World’ Text across it using 3d effects
3) Save the image
I am successfully loading the image
However I do not have a graphic object to use, in your example from the winform you use a creategraphic object from the ‘Panel’ control
'Dim g As Graphics = _pnlViewer.CreateGraphics()
I am attempting to do this over a web project therefore do not have the option of using that control.
Again in your demo code you set the rectangle object from the panel control, I believe I am setting this correctly using the loaded image instead.
Please can you advise how to create a graphic object and how I would save the _Image once I have added the text to it!
Regards
Tom
Function PaintSpecialEffects()
If Not _image Is Nothing Then
_image.Dispose()
End If
_image = _codecs.LoadCmykPlanes("c:\verytemp\cmykTest.tif", 8, 1)
Try
'Dim g As Graphics = _pnlViewer.CreateGraphics()
'Dim rc As Rectangle = _pnlViewer.ClientRectangle
Dim g As Graphics
Dim rc As Rectangle
rc.Height = _image.Height
rc.Width = _image.Width
rc.X = 0
rc.Y = 0
Dim ff As FontFamily = New FontFamily("Arial")
Dim f As Font = New Font(ff, 48)
_processor.Draw3dText(g, _textOptions.Text, rc, _textOptions.Style, SpecialEffectsTextAlignmentFlags.HorizontalCenter Or SpecialEffectsTextAlignmentFlags.VerticalCenter, 5, 5, _textOptions.TextColor, _textOptions.BorderColor, Color.White, f, Nothing)
Catch ex As Exception
RaiseEvent RaiseError(ex.Message)
End Try
' g.Dispose()
End Function
#2
Posted
:
Thursday, November 15, 2007 7:20:53 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
I noticed that you also sent an email about this same topic. In the future, please only inquire about the same issue in one medium of support. This will help ensure that you will not have multiple people working on the same issue and gives you the best support possible.
What does this code produce on the website? A blank page, anything? What are you expecting? Have you gotten this to work in a winforms project first to make sure you are doing everything right? If it works, then all you should have to do in the web is change the graphics object.
You can create a Graphics object from a RasterImage if you use the RasterImage.CreateGdiPlusGraphics() function. If you don't want the panel, this is probably what you'll need to do.
Actually you can use Winforms controls on the web if you create them inside of a UserControl. Take a look at this forum post regarding the topic:
http://support.leadtools.com/SupportPortal/cs/forums/7653/ShowPost.aspx
LEADTOOLS Support
General
General Questions
Beginner: Loading Image VB.NET ASP 2.0 VS 2005
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.