Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, August 20, 2007 7:50:55 PM(UTC)
brunopacola

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,




 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, August 21, 2007 8:48:16 AM(UTC)
brunopacola

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:52:29 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,040

Was thanked: 1 time(s) in 1 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.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.290 seconds.