Image quality

HARRY

Active Member
Licensed User
Longtime User
Hi,

I have made pictures (JPG) of some texts (a text consists of one or two words) and have assigned those to the contacts in the contactscollection. The pictures are 200 * 200 and have an excellent quality.

When they are used in Windows Mobile , e.g. in the contacts survey or the photo program, then they are reduced in size to say 45 * 45 , but the quality is still excellent: sharp characters.

Now, in my own program I read those into a BitmapEx using GetPicture from the Outlook library. When I show the picture in the original size in an Image, then the quality is still perfect.

Then I reduce the size, using DrawImage (DrawerEx) on a Form and two rectangles, to 50 * 50. Now the characters in the pictures are frayed. It looks poor in comparison with the display in the Mobile Windows programs. It makes no difference whether I draw on the forelayer or the backlayer.

1) Do I use the tools (ImageLibEx and ControlsExdevice (Dummy) in the wrong way. Are there other tools?

2) I tried also to draw on a large image covering the complete form, but I do not succeed to define a DrawerEx for a NativeImage. Isn't that possible? If yes, please a sample to define a drawerex for the NativeImage called "NImage1".

Harry
 

agraham

Expert
Licensed User
Longtime User
I can't comment on the image quality without seeing it.

A Drawer or DrawerEx draws on a Bitmap, not on a Control so you draw on the Bitmap or BitmapEx assigned to the NativeImage Image property. It is just like an ordinary Image control (but different :)).
 

Saj

Active Member
Licensed User
I've noticed that when reducing the size of an image, the reduction should be 'half multiples', e.g. 50%, 25%... , other values result in a 'fuzzy' image on the device.
 

HARRY

Active Member
Licensed User
Longtime User
Hi Andrew,

I have made 2 screen shots to show the quality difference. My screen size is 480* 800. Unfortunately these .png files are too big to upload. When I reduce the size of those the effects are no longer clear. When you permit I can send you an email with these pictures as annexes.

For your information: DrawString 'prints' perfectly on a form, whatever character size I use.

A long time ago (10 years?) I changed over in Visual Basic from GDI to GDI+, which was quite an improvement. GDI+ exists for Windows Mobile, but cannot be used from Basic4PPC, isn't it?

Hi Saj,

I reduce the size exactly with a factor 4 from 200 * 200 to 50 * 50.

Harry
 

agraham

Expert
Licensed User
Longtime User
ImageLib and ImageLibEx DrawImage implement the only way I know that a Compact Framework Graphics object can resize an image.

GDI+ does exist for Windows Mobile but is not exposed as part of the Compact Framework. I did look at making a library but the task is too big and would need full time work for quite a long time to implement and test and I am not prepared put in the required amount of effort for what is a hobby to me.

You could try LoadThumbnail from my JPEG library. Although intended for large images there is no reason why it won't work for smaller ones and it offers two different quality options for resizing. You should try both and see if either is better than what you are getting now.
 
Top