Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist > Bug Reports
Documentation Wiki Register Members List B4P 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, 03:07 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
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?
Reply With Quote
  #2 (permalink)  
Old 10-24-2007, 03:43 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
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, 03:49 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,701
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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, 04:12 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
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, 05:40 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,701
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MouseMove over Image - problem DaveW Questions (Windows Mobile) 10 11-04-2008 08:27 AM
Problem With Form Size RandomCoder Questions (Windows Mobile) 15 09-05-2008 02:03 PM
Problem: fetch and store image to/from database willisgt Questions (Windows Mobile) 2 05-13-2008 03:10 PM
Image problem with ImageButtons klaus Bug Reports 3 02-15-2008 08:10 AM
Form size problem on PC? agraham Bug Reports 12 07-05-2007 12:00 PM


All times are GMT. The time now is 02:59 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0