Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Bug Reports
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.


Image size problem


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-24-2007, 04:07 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,704
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default Image size problem

I'm not too good a drawing/image stuff and I can't see the problem here so I don't know if it is some sort of bug or not.

In the attached zip file are two nominally identical bmp files made in Paint Shop Pro XI and a screen shot showing that when I display them with this code
Code:
Sub Globals
	'Declare the global variables here.
	BmpFile1 = AppPath & "\Garden.bmp"
	BmpFile2 = AppPath & "\Garden2.bmp"
End Sub

Sub App_Start
	Form1.Show
	Form1.DrawImage(bmpfile1,0,0)	
	Form1.DrawImage(bmpfile2,100,100)
End Sub
Garden2.bmp is drawn 2.5 times as small as it should be. Changing the order of drawing and their locations makes no difference. Other apps like ACDSee, Paint, Windows Gallery etc. display them the same size as each other.

Does anyone know what's happening here?
Attached Files
File Type: zip Garden.zip (66.2 KB, 10 views)
Reply With Quote
  #2 (permalink)  
Old 10-24-2007, 04:43 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 640
Default

There must be something wrong with your saving options.
I took your .bmp files, opend them with IrfanView and saved them again as a .bmp file format (with different names). These newly saved .bmp files work fine, they both have the same size!


specci48
Reply With Quote
  #3 (permalink)  
Old 10-24-2007, 04:49 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,143
Default

Right click on the images and choose: Properties - Summary.
One image's resolution (garden2.bmp) is 240 and the other resolution is 96.
This causes garden2.bmp to be drawn smaller.
Reply With Quote
  #4 (permalink)  
Old 10-24-2007, 05:12 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,704
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Ah! Thank you Erel,so that's it! The ratio of resolutions explains the 2.5 times difference.

Quote:
Right click on the images and choose: Properties - Summary.
Vista doesn't give that detail in Properties->Details but I checked in Paint Shop Pro.

I had interpreted the phrase "original size" in the help to mean the actual bitmap size. For the record - and to be pedantic - can you confirm that to get a drawn bitmap sized to the actual bitmap size the resolution needs to be set to exactly 96 ppi? I assume there is no way of overriding this apart from editing the bitmap properties.
Reply With Quote
  #5 (permalink)  
Old 10-24-2007, 06:40 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,143
Default

It is probably 96 dpi. I searched MSDN documentation and I didn't find the actual number.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
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
MouseMove over Image - problem DaveW Questions & Help Needed 10 11-04-2008 09:27 AM
Problem With Form Size RandomCoder Questions & Help Needed 15 09-05-2008 03:03 PM
Problem: fetch and store image to/from database willisgt Questions & Help Needed 2 05-13-2008 04:10 PM
Image problem with ImageButtons klaus Bug Reports 3 02-15-2008 09:10 AM
Form size problem on PC? agraham Bug Reports 12 07-05-2007 01:00 PM


All times are GMT. The time now is 11:05 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0