Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Chart.Export max pixel size?

A week or so ago I posted concerning a utility program that can create
a GIF file from any picture or bitmap copied to the clipboard. The
clipboard copy might be of a range, shape, chart, or anything else.
As almost always happens, no sooner had I uploaded the program than I
read a tip in another thread that I could have used. In this case it
was Jon Peltier showing how it is much simpler to just do a
Sheets(1).ChartObjects.Add(Left, Top, Width, Height)
to add an embedded chart, rather than mimicking the macro recorder
method of adding a new separate chart sheet, relocating the chart back
to a worksheet, then resizing and repositioning the chart. (Thank you
Jon, and thanks again to Harald Staff, David McRitchie, and Stephen
Bullen.)

I've updated the utility program and have also added the ability to
save in GIF, JPEG, or PNG format. Available for free at
www.qsl.net/ac6la/. But that's not the reason for this post.

I'm trying to get more info on an Excel limitation (?) concerning the
max pixel size of a file created with the Chart.Export method. When
running on a machine with Windows Me and a 19 inch display with
graphics card "A", the maximum dimensions of the export file are 1238
by 1238 pixels. This is true for any of the 3 filters (GIF/JPEG/PNG),
under both XL97 and XL2000, and for several different screen
resolutions (1024x768, 1280x1024, etc). However, on another machine
running Windows XP Home and a 17 inch display with graphics card "B",
the max seems to be 874 x 894 pixels when I have the screen resolution
set to 800 x 600, but is 1119 x 1144 pixels when I set the display to
1024 x 768. (To create these large images I typically do a PrtScrn to
copy the desktop, then use the utility program to create a 2x
enlargement. Then I open the resulting file with Photo Editor and see
where it got clipped.)

Can anyone shed any light on this? I'd like to be able to alert the
user when an exported file has been clipped. (Without reading the
file back in, if possible.)

Thanks,
Dan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Chart.Export max pixel size?

Dan -

I have experienced this clipping of large exported chart images. I
believe it's related to the truncation of images when Excel ranges or
charts are copied and to the cropping of objects pasted into PowerPoint.
Long ago I tried to sort out the details; I seem to recall that copying
as a picture, using the picture option (metafile) not the bitmap option,
produced the largest possible images without cropping. The issue with
pasting into PowerPoint is covered on the PPT FAQ page:

http://www.rdpslides.com/pptfaq/FAQ00068.htm

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

Dan wrote:

A week or so ago I posted concerning a utility program that can create
a GIF file from any picture or bitmap copied to the clipboard. The
clipboard copy might be of a range, shape, chart, or anything else.
As almost always happens, no sooner had I uploaded the program than I
read a tip in another thread that I could have used. In this case it
was Jon Peltier showing how it is much simpler to just do a
Sheets(1).ChartObjects.Add(Left, Top, Width, Height)
to add an embedded chart, rather than mimicking the macro recorder
method of adding a new separate chart sheet, relocating the chart back
to a worksheet, then resizing and repositioning the chart. (Thank you
Jon, and thanks again to Harald Staff, David McRitchie, and Stephen
Bullen.)

I've updated the utility program and have also added the ability to
save in GIF, JPEG, or PNG format. Available for free at
www.qsl.net/ac6la/. But that's not the reason for this post.

I'm trying to get more info on an Excel limitation (?) concerning the
max pixel size of a file created with the Chart.Export method. When
running on a machine with Windows Me and a 19 inch display with
graphics card "A", the maximum dimensions of the export file are 1238
by 1238 pixels. This is true for any of the 3 filters (GIF/JPEG/PNG),
under both XL97 and XL2000, and for several different screen
resolutions (1024x768, 1280x1024, etc). However, on another machine
running Windows XP Home and a 17 inch display with graphics card "B",
the max seems to be 874 x 894 pixels when I have the screen resolution
set to 800 x 600, but is 1119 x 1144 pixels when I set the display to
1024 x 768. (To create these large images I typically do a PrtScrn to
copy the desktop, then use the utility program to create a 2x
enlargement. Then I open the resulting file with Photo Editor and see
where it got clipped.)

Can anyone shed any light on this? I'd like to be able to alert the
user when an exported file has been clipped. (Without reading the
file back in, if possible.)

Thanks,
Dan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Chart.Export max pixel size?

Jon,

Thanks for the feedback. Maybe I'll look into what it would take to
read back at least the header info of the exported file to see what
the pixel size is, so that I can warn the user if anything got
clipped. Anybody know where I might start looking to find out the
(binary?) format for GIF, JPEG, and PNG files?

And thanks again for the ChartObjects.Add tip.

Dan


Jon Peltier wrote in message ...
Dan -

I have experienced this clipping of large exported chart images.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Chart.Export max pixel size?

Dan -

You can probably find an API to read the pixel dimensions of the image
files.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

Dan wrote:

Jon,

Thanks for the feedback. Maybe I'll look into what it would take to
read back at least the header info of the exported file to see what
the pixel size is, so that I can warn the user if anything got
clipped. Anybody know where I might start looking to find out the
(binary?) format for GIF, JPEG, and PNG files?

And thanks again for the ChartObjects.Add tip.

Dan


Jon Peltier wrote in message ...

Dan -

I have experienced this clipping of large exported chart images.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 export as XML size limit/bug Erik C. Nielsen Excel Discussion (Misc queries) 0 December 26th 07 07:09 PM
Excel 2007 export file size huge Andy Payne Excel Discussion (Misc queries) 1 March 17th 07 11:08 PM
How do I break a csv file into smaller size for export? svb New Users to Excel 1 December 21st 05 11:50 PM
How do I change chart cell from pixel to inch? Brenda Charts and Charting in Excel 2 February 4th 05 05:05 AM
export chart - size problem Art Parra Charts and Charting in Excel 1 December 7th 04 01:58 AM


All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"