473,386 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Resizing image control with jpg image

Using A2K I have an image control on a report and use code to set the
image.picture to the required jpg. 3 of the jpgs resize properly but
2 do not - they display much smaller than the image control. The
problem jpgs were originally created as line drawings in Word. They
were then copy and pasted to Paint where they were saved as jpg files.
Sizemode is set to stretch.(have tried clip and zoom but no better). I
cannot find any way to make them expand to the size of the image
control.

May 12 '06 #1
1 9450
Here is a previous post of mine on this subject. If you did a search on
GoogleGroups you would find a lot more detail on this subject from earlier
posts of mine. Specifically, I have seen instances when the ImageWidth and
ImageHeight props do not return the correct values, thus error/boundary
checking is required.

If you are working with an Image that was not scanned/created and not
designed to be displayed at a specific resolution then you can simply:

1) Load the Image into your Image control

2) Set the Image control's Width to its ImageWidth property

3) Set the Image control's Height to its ImageHeight property

' Modify code to reference your Image control's Name
Me.NameOfYourImageControl.Picture = "C\NameOfAPic.jpg"

Me.NameOfYourImageControl.Width = Me.NameOfYourImageControl.ImageWidth

Me.NameOfYourImageControl.Height = Me.NameOfYourImageControl.ImageHeight

Message 4 in thread
From: Stephen Lebans (StephenLeb...@mvps.org)
Subject: Re: letters & signatures
View this article only
Newsgroups: comp.databases.ms-access
Date: 2002-06-11 19:45:15 PST
Once you load the Image into the Image control you can access the
control's ImageHeight and ImageWIdth properties to ascertain the size of
the Image. The issue here though is you really need to know at what
resolution the signatures were originally scanned at. I'll give you an
example:
1) Scanned at 300DPI
2) Saved as a Bitmap 600w x 300h
3) Load into Image control. Read ImageWidth and Height props.
4) 600/300 = 2 inches wide - 300/300 = 1 inch tall
5) ImageControl.Width = 1440 * 2
6) ImageControl.Height = 1440 * 1
7) ImageControl.SizeMode = acOLESizeZoom
8) Position the Image control as required.
1440 = Twips per Inch

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Brian" <br*************@aol.com> wrote in message
news:11*********************@j73g2000cwa.googlegro ups.com...
Using A2K I have an image control on a report and use code to set the
image.picture to the required jpg. 3 of the jpgs resize properly but
2 do not - they display much smaller than the image control. The
problem jpgs were originally created as line drawings in Word. They
were then copy and pasted to Paint where they were saved as jpg files.
Sizemode is set to stretch.(have tried clip and zoom but no better). I
cannot find any way to make them expand to the size of the image
control.

May 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Neil Woodvine | last post by:
***Scenario ... I have a DataList with a hyperlink WebControl in the Item Template. I want to display a 64x64 image in the Hyperlink and set the NavigateURL to the full size image. ***Source...
5
by: Jim | last post by:
I've heard that resizing images through PHP (either GD2 or ImageMagick) is a processor intensive exercise. I'm setting up a site where users will be uploading up to 10 images along with the details...
11
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that...
0
by: Sam Barham | last post by:
I have a ListView control, for which I have overwritten the WndProc method to gain access to the WM_PAINT message and generate my own OnPaint and OnPaintBackground messages, in order to colour the...
10
by: David W. Simmonds | last post by:
I have a DataList control that has an Image control in the ItemTemplate. I would like to resize the image that goes into that control. I have a series of jpg files that are full size, full...
2
by: Geoff Turner | last post by:
Hi all, I have an application that requires me to load an image into a picture or image or picclip control.Picture will be JPG format and of size 800 X 600 pixels. It will be displayed as say, 200...
6
by: tomasio | last post by:
Dear NG, years have passed and I am still more designer than programmer. I build a new version of my website which has a few nasty bugs, especially on my startpage: Resizing text brakes the...
10
by: mishrarajesh44 | last post by:
hii all, I am facing a problem currently.. i have a script for image uploading and resizing.. the image uploading takes place properly for every size images.. but, the resizing works for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.