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, September 14, 2009 6:11:55 AM(UTC)
dave.deisz

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?
 

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, September 15, 2009 3:55:50 AM(UTC)

Basel  
Guest

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)
dave.deisz

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)
dave.deisz

Groups: Registered
Posts: 6


attachment added
 
#5 Posted : Tuesday, September 15, 2009 6:12:43 AM(UTC)
dave.deisz

Groups: Registered
Posts: 6


last try with atachment - forum won't save it
File Attachment(s):
Erin&WaielStamp.rar (26kb) downloaded 22 time(s).
 
#6 Posted : Wednesday, September 16, 2009 12:33:19 AM(UTC)

Basel  
Guest

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)
dave.deisz

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)

Basel  
Guest

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.
 
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-2024, Yet Another Forum.NET
This page was generated in 0.099 seconds.