LEADTOOLS Support
Imaging
Imaging SDK Questions
PSD file colors inverted - Raster Imaging Pro v14 - VB.NET
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, September 14, 2009 6:11:55 AM(UTC)
Groups: Registered
Posts: 6
Our application allows users to upload logos in different formats, one of which is PSD.
We only allow 1-bit output, so the first step in our application is to convert the uploaded PSD to a 1-bit bitmap.
bmpLeadProc.ColorRes(bmpLeadGraphic, 1, ColorResPaletteConstants.CRP_FIXEDPALETTE, ColorResDitherConstants.CRD_NODITHERING, 2)
After we have done this, the user is allowed to enter text that is then merged with the uploaded logo. To do this we have 2 Lead bitmaps - one for the text and one for the logo - that we merge using the Combine method. The flags property of the Combine call is set to CombineConstants.CB_OP_ADD + CombineConstants.CB_DST_0
Some of the end images have the PSD logo colors inverted - what should be black is white and what should be white is black. However, it doesn't happen with all PSD files.
Is there some way to tell once I load the PSD into the Lead bitmap and if the colors will end up inverted?
#2
Posted
:
Tuesday, September 15, 2009 3:55:50 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Can you please send me files that get inverted? And also, if you have a small sample project that shows how the PSD colors get inverted, please put them all in a ZIP or a RAR file and post them here or send them to
support@leadtools.com and mention this forum post.
This sample shows how to apply the Combine Command using VB.NET 14.5:
Private Sub CombineTest(ByVal image As Leadtools.IRasterImage)
Dim command As Leadtools.ImageProcessing.Effects.CombineCommand = New Leadtools.ImageProcessing.Effects.CombineCommand
command.SourceImage = image.Clone()
command.DestinationRectangle = New System.Drawing.Rectangle(image.Width \ 8, image.Height \ 8, image.Width, image.Height)
command.SourcePoint = New System.Drawing.Point(0, 0)
command.Flags = Leadtools.ImageProcessing.Effects.CombineCommandFlags.OperationAdd Or Leadtools.ImageProcessing.Effects.CombineCommandFlags.Destination0 Or Leadtools.ImageProcessing.Effects.CombineCommandFlags.SourceRed Or Leadtools.ImageProcessing.Effects.CombineCommandFlags.DestinationGreen Or Leadtools.ImageProcessing.Effects.CombineCommandFlags.ResultBlue
command.Run(image)
End Sub
Also, send your toolkit serial number and the DLLs build number to
support@leadtools.com.
#3
Posted
:
Tuesday, September 15, 2009 6:09:26 AM(UTC)
Groups: Registered
Posts: 6
Attached is a sample that inverts the colors. I verified that this happens with the Demo programs included with the raster imaging toolkit, so I did not include a sample project.
#4
Posted
:
Tuesday, September 15, 2009 6:10:34 AM(UTC)
Groups: Registered
Posts: 6
#5
Posted
:
Tuesday, September 15, 2009 6:12:43 AM(UTC)
Groups: Registered
Posts: 6
last try with atachment - forum won't save it
#6
Posted
:
Wednesday, September 16, 2009 12:33:19 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
It tried to combine it with an image using our .NET 14.5 main demo, and it worked correctly.
The DLL build (file version info) for my LEADTOOLS files is 14.5.0.82. What's your DLLs version number? If it's smaller than this value, please send your toolkit serial number (do NOT post it here) to
support@leadtools.com and mention this forum post.
If you already have the latest build, can you please give me steps to reproduce the issue using our demos?
#7
Posted
:
Wednesday, September 16, 2009 4:00:10 AM(UTC)
Groups: Registered
Posts: 6
We are using LeadTools V14 - not v14.5. We are using the COM objects in a VB.NET environment. My DLL build number is 14.0.0.43.
#8
Posted
:
Thursday, September 17, 2009 4:16:50 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Owners of 14.0 toolkit can have updated DLLs with build numbers 14.5.0.XX, so the patches I sent you should be OK to use.
LEADTOOLS Support
Imaging
Imaging SDK Questions
PSD file colors inverted - Raster Imaging Pro v14 - VB.NET
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.