[dba-VB] Dynamically resizing an image on a Crystal Report

Seth Galitzer sgsax at ksu.edu
Fri May 28 07:29:33 CDT 2004


Doris,

In general, 1440 twips = 1 inch.  So if you know the dimensions of your
image in inches, you can use this.  However, if you know the dimensions
of your image in pixels, then you need to convert pixels to twips using
some API coding  I found this in the MS KB which should help you get
going:

"ACC: How to Convert Twips to Pixels"
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q94927

Enjoy!
Seth

On Fri, 2004-05-28 at 06:03, Mike & Doris Manning wrote:
> I'm looking to change the height and width of the image container
> appropriately so that the picture doesn't get distorted -- not the size of
> the file itself.  I know how to get the height and width of the image file.
> Just don't know what to do with that information.  I obviously need to
> convert it to twips but what formula would I use?
> 
> Doris Manning
> Database Administrator
> Hargrove Inc.
> www.hargroveinc.com
> 
> 
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence
> (AccessD)
> Sent: Thursday, May 27, 2004 8:42 PM
> To: dba-vb at databaseadvisors.com
> Subject: RE: [dba-VB] Dynamically resizing an image on a Crystal Report
> 
> 
> Can I assume that when you say size you mean size not height and width not
> size like in capacity (ie. 120K). The first one is easy to do setting a
> fixed image container on the report. To actually change the size of the
> file, automatically, would require access to various dlls or scripts files
> from a packages like Adobe Photoshop or Corel Painter but the result may not
> be what you expect or need.
> 
> HTH
> Jim
> 
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris
> Manning
> Sent: Thursday, May 27, 2004 8:48 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] Dynamically resizing an image on a Crystal Report
> 
> 
> VB.NET
> Crystal Reports 10
> SQL Server 2000
> 
> I have a dataset that gets a dynamic image from a network location and
> displays it on a Crystal Report.  My problem is that the size of the image
> files will vary and I need to resize the blob field on the report.
> 
> Would anyone happen to have code for how to dynamically resize a blob field
> on a Crystal Report at runtime?
> 
> Mike and Doris Manning
> mikedorism at adelphia.net
> 
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
-- 
Seth Galitzer			sgsax at ksu.edu
Computing Specialist		http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University




More information about the dba-VB mailing list