473,769 Members | 4,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9512
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.NameOfYourIm ageControl.Pict ure = "C\NameOfAPic.j pg"

Me.NameOfYourIm ageControl.Widt h = Me.NameOfYourIm ageControl.Imag eWidth

Me.NameOfYourIm ageControl.Heig ht = Me.NameOfYourIm ageControl.Imag eHeight

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.Wi dth = 1440 * 2
6) ImageControl.He ight = 1440 * 1
7) ImageControl.Si zeMode = 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******** *************@j 73g2000cwa.goog legroups.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
2953
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 Data Item for Databinding is a class with 2 props ... URL Description ***MyMainPage.aspx Page_Load Code ...
5
4730
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 of their product. For each image uploaded (max 500Kb), I'll be resizing it to create a small, medium and large version after which I'll discard the original. My worry is that as the site becomes more popular, the processor time spent resizing...
11
18836
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 they are too big and wind up covering up some of the fields on the main form. Is there any good code out there that works in a similar fashion that will also either a) stretch the form width wise on widescreens or b), rely on height rather than...
0
2181
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 columns of the listview to my liking. When a row of the listview is selected, some controls are displayed on that row of the listview (so sort of like a property list thingy). In order to get the controls (specifically buttons) to display how I...
10
4163
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 resolution (ie. large). I have a database that contains references to the pictures. Currently I have to resize the jpgs manually, and then point the ImageUrl property at that jpg using databinding. This works fine. I would like to avoid the resizing step...
2
14559
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 X 100 pixels. Question: Is it possible to save the image as a 200 X 100 image, or can I only save it as 800 X 600? I have tried, using a picture control, 'SavePicture Picture1.Picture, "qaz.jpg"' which does not save the resize the image. Any...
6
2263
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 dotted lines which I use as visual border on the left and right edge of the page layout and thus produces an unwanted white gap above the enlarged text. Viewing the page with IE shows this behaviour even without changing the font size.
10
7075
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 only small sized iamages.. for eg. resizing takes place for 70 kb sized images but fails for 600kb or more.. my code is below..
0
9416
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9849
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3551
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2810
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.