This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, August 20, 2007 7:45:55 PM(UTC)
Groups: Registered
Posts: 4
Hi,
I need insert a MASK PNG TRANSPARENCY but the color that wrong!
Example:
Original image:
http://www.mtfazendas.com.br/Diversos/ImageOriginal.jpg
Image PNG:
http://www.mtfazendas.com.br/Diversos/MarcaMTFazendas.png
Image Correct:
http://www.mtfazendas.com.br/Diversos/ImageCorrect.jpg
BUT LEADTOOLS....
Image INCorrect:
http://www.mtfazendas.com.br/Diversos/ImageINCorrect.jpg
CODE USED: RasterCodecs.Startup()
Dim codecs As RasterCodecs = New RasterCodecs()
Dim srcFileName As String = CaminhoOrigem & "\" & arqOrigem.Name '"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Slave.jpg"
Dim imageInfo As CodecsImageInfo = codecs.GetInformation(srcFileName, True)
codecs.Options.Jpeg.Load.DisableMmx = False
codecs.Options.Jpeg.Load.DisableP3 = False
codecs.Options.Jpeg.Load.ForceRgbFile = False
codecs.Options.Jpeg.Load.UseBadJpegPredictor = False
Dim srcImage As RasterImage = codecs.Load(srcFileName)
If imageInfo.Jpeg.IsProgressive Then
codecs.Options.Jpeg.Save.Passes = 0
End If
codecs.Options.Jpeg.Save.FixedPaletteStamp = False
codecs.Options.Jpeg.Save.JpegStamp = True
codecs.Options.Jpeg.Save.SaveWithoutTimestamp = True
codecs.Options.Jpeg.Save.SaveWithStamp = True
codecs.Options.Jpeg.Save.StampBitsPerPixel = srcImage.BitsPerPixel
codecs.Options.Jpeg.Save.StampHeight = 100
codecs.Options.Jpeg.Save.StampWidth = 100
codecs.Options.Jpeg.Save.YccStamp = True
codecs.Options.Jpeg.Save.CmpQualityFactorPredefined = CodecsCmpQualityFactorPredefined.MaximumQuality
codecs.Options.Jpeg.Save.DisableMmx = False
codecs.Options.Jpeg.Save.DisableP3 = False
codecs.Options.Jpeg.Save.SaveOldJtif = False
Dim ComandoImagem As Leadtools.ImageProcessing.SizeCommand = New Leadtools.ImageProcessing.SizeCommand
ComandoImagem.Flags = Leadtools.RasterSizeFlags.Bicubic
ComandoImagem.Width = 398
ComandoImagem.Height = 299
ComandoImagem.Run(srcImage)
Dim srcImageMarca As RasterImage = codecs.Load("C:\Documents and Settings\Pacola\Meus documentos\MarcaMTFazendas.png")
Dim command As CombineCommand = New CombineCommand
command.SourceImage = srcImageMarca.Clone()
command.DestinationRectangle = New System.Drawing.Rectangle(182, 265, 398, 299)
command.SourcePoint = New System.Drawing.Point(0, 0)
command.Flags = CombineCommandFlags.SourceNop
command.Run(srcImage)
codecs.Save(srcImage, CaminhoDestino & "\gde\TEST" & QuantidadeFotosStr & arqOrigem.Extension, RasterImageFormat.Jpeg, srcImage.BitsPerPixel)Thanks,
#2
Posted
:
Tuesday, August 21, 2007 8:43:16 AM(UTC)
Groups: Registered
Posts: 4
I'm trying...
Code example:
Public Sub
FeatherAlphaBlendCommandExample()
RasterCodecs.Startup()
Dim codecs As New
RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim leadImage
As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS
15\Images\Master.jpg")
Dim command
As FeatherAlphaBlendCommand = New
FeatherAlphaBlendCommand
command.DestinationRectangle = New Rectangle(0, 0, leadImage.Width \ 2, leadImage.Height \
2)
command.MaskImage = codecs.Load("C:\Program
Files\LEAD Technologies\LEADTOOLS 15\Images\Image3.cmp", 24,
CodecsLoadByteOrder.Bgr, 1, 1)
command.SourceImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS
15\Images\Image2.cmp", 24, CodecsLoadByteOrder.Bgr, 1,
1)
command.SourcePoint = New Point(0,
0)
command.Run(leadImage)
codecs.Save(leadImage, "C:\Program Files\LEAD Technologies\LEADTOOLS
15\Images\Result.jpg", RasterImageFormat.Jpeg,
24)
command.SourceImage.Dispose()
RasterCodecs.Shutdown()
End Sub
But..message error:
"Leadtools Pro features are not enabled"
#3
Posted
:
Thursday, August 23, 2007 5:47:29 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
The error message that you are
getting is due to the Raster pro capabilities being locked. You need to use the
Unlock method to unlock the pro capabilities.
The unlock key is located in
the following directory [LEADTOOLS 15\Include\Ltkey.h] of your LEADTOOLS installation.
If you face any problems, please send your serial
number to support@leadtools.com
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.