Loading...

Create image to clipboard from Excel

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Create image to clipboard from Excel

Postby aviben » Mon Jun 25, 2007 11:29 pm

Hello,

I am creating a picture in the clipboard from a table in Excel with the copypicture command in Excel with "Format:=xlPicture".

oGdPicture.CreateImageFromClipboard does not seem to capture this format as nothing happens when i try so save the resulting picture.

When i use the same process with "Format:=xlBitmap" , the picture is saved

Could you try to explain what happens and how could i use the former option?

Thanks a lot
Avi
aviben
 
Posts: 6
Joined: Sat Jun 02, 2007 10:59 pm

Postby Loïc » Tue Jun 26, 2007 4:08 pm

Hi,

I added some modifications to the last edition with the clipboard capabilities.

Could you download it and try to load an image stored as xlPicture format ?

Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Create image to clipboard from Excel

Postby aviben » Tue Jun 26, 2007 6:40 pm

Hello Loic,

Thanks a lot for your reply and your seamless support

I've downloaded the new version but do not get the expected results. Actually, when i try to watermark the Created image from the clipboard and copy it to the clipboard, the watermark does'nt appear as in the earlier version. The SaveAs reproduce the watermark

Please try helping
Avi
aviben
 
Posts: 6
Joined: Sat Jun 02, 2007 10:59 pm

Postby Loïc » Wed Jun 27, 2007 10:54 am

Hi Avi.

I am a bit confused.

What you want to do exactly ?

Cound you write few lines of code and explain where the problem seems to appear ?

Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby aviben » Sun Jul 01, 2007 8:22 am

Hi Loic,

Sorry for having been unclear

I have as recommended used the new version but a new problem arises without solving the first one

1st and original problem:
When copying a range in Excel with the following command
(oWB.Application.Worksheets(wCurrChartSht).Range(addrange).CopyPicture Appearance:=xlScreen, Format:=xlPicture)
the oGdPicture.CreateImageFromClipboard fails. It works when Format:=Bitmap

2nd and New problem in the new version:
The new vesion seems not to be able to watermark the picture in the clipboard (when i use the Format:=Bitmap). It means that a user can take rid of the watermark by registering the new version

I hope to have been + clair

Please help
Avi
aviben
 
Posts: 6
Joined: Sat Jun 02, 2007 10:59 pm

Postby Loïc » Mon Jul 02, 2007 11:05 am

Ok it is clearer.

Could you try to use the new 3.7.11 edition ?

http://www.gdpicture.com/download.php


I've added nex fix with the clipboard methods.


Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby aviben » Mon Jul 02, 2007 10:36 pm

The recommended version causes VB6 to crash when the format is XlPicture and the method is CopyToCipboard:

oWB.Application.Worksheets(wCurrChartSht).Range(addrange).CopyPicture Appearance:=xlScreen, Format:=xlPicture
oGdPicture.CreateImageFromClipboard
oGdPicture.CopyToClipboard


The crash occurs at oGdPicture.CopyToClipboard

Thanks for your help
Avi
aviben
 
Posts: 6
Joined: Sat Jun 02, 2007 10:59 pm

Postby Loïc » Tue Jul 03, 2007 11:18 am

Ok I've found your problem.

Please, download an other time the new release ( 3.7.12).

It will works !

Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby aviben » Tue Jul 03, 2007 1:17 pm

Thanks a lot. Iworks,but....

Now the problem is that the resulting image in the clipboard can be pasted only with PPApp.ActiveWindow.View.PasteSpecial ppPasteBitmap

When i try to paste with another format such as
PPApp.ActiveWindow.View.PasteSpecial ppPasteGif , it fails

Is there some way to adapt the clipboard image to different pasting formats?

Thanks a lot
Avi
aviben
 
Posts: 6
Joined: Sat Jun 02, 2007 10:59 pm

Postby Loïc » Tue Jul 03, 2007 1:55 pm

It is probably due to the image pixel format.

You can try to convert it to 24bpp before copying it to the clipboard.

See ConvertTo24bpp() method.


Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby aviben » Wed Jul 04, 2007 9:20 pm

Hi Loic,

I feel quite embarrased to continue bother you with my very specific problem, so try to be patient.

Now with the latest version, the folowing commands work
oWB.Application.Worksheets(wCurrChartSht).Range(addrange).CopyPicture Appearance:=xlScreen, Format:=xlPicture
oGdPicture.CreateImageFromClipboard
oGdPicture.CopyToClipboard


The problem is that the resulting image created with oGdPicture.CreateImageFromClipboard is not the same as when i perform a paste direcly from Windows. I usually get a larger picture, cropped at one side and with a noisy text. As i told the problem happens at the oGdPicture.CreateImageFromClipboard stage

I have tried the to oGdPicture.ConvertToXXBpp , but it does not help

The problem happens when the copied object in Excel is a table and not when it is a chart

Thanks a lot
Avi
aviben
 
Posts: 6
Joined: Sat Jun 02, 2007 10:59 pm

Postby Loïc » Tue Jul 10, 2007 6:37 pm

Hi,


Sorry for the late.
In the last release your problem seems to be solved :wink:


Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby Loïc » Wed Jul 11, 2007 12:58 pm

Hi,

I've foud an other error from the windows API... :?


With the next release, all your problems will be solved.

Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby Loïc » Fri Jul 13, 2007 5:48 pm

Your problem is now totally solved into the last release: http://www.gdpicture.com/products/gdpic ... ctivex.php


Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron