b4PPC V 6.5 optimized compilation
I am working on an app to view files related to OziExplorerCE
http://www.b4x.com/forum/share-your-creations/3654-ozi-files-viewer.html
Zooming with ImageLibEx.dll is still not really clear to me.
@Klaus:
In your scaledMap project
http://www.b4x.com/forum/chit-chat/3553-mapping.html :sign0188:
for zooming you use the dzImage DLL instead of mapDisplay.Zoom(zoom.Value) from ImageLibEx.
Is that because the increasing memory consumption with every zoom action?
That is what happens with my FS Loox 720 Win 2003 SE. and as well on the desktop.
So for zooming I use dzImage as well.
But with it I have also problems.
The jpg map inflatet to bitmap is about 1.3 MByte.
With a zoom of 160 % I get a "OutOfMemoryException"
With a zoom of 100 % i have 22 MB of free memory.
With a zoom of 120 % i have 21.6 MB of free memory.
With a zoom of 140 % i have 20.9 MB of free memory.
With a zoom of "160 %" (which didn't zoom) i have 20.9 MB of free memory as well after the error message.
The same image viewed and zoomed with other apps as "TCPMP" or "Album für Pocket PC" is no problem at all.
With this apps a zoom doesn't even change the use of memory.
As well they don't keep a copy of the original image for zooming.
(if I load the image with my app memory decreases by ~2.6 MB.
with these other apps by ~1.3 MB) (the used image is included in the above project:"Ozi Files Viewer")
:sign0085:
Are there different strategies with zooming?
Am I doing something wrong?
and does anybody know a way for me to achieve higher zoom levels without needing an other image file?
ZPktX is the zoom point (middle of screen)
Thanks a lot for any hints
Bernd
I am working on an app to view files related to OziExplorerCE
http://www.b4x.com/forum/share-your-creations/3654-ozi-files-viewer.html
Zooming with ImageLibEx.dll is still not really clear to me.
@Klaus:
In your scaledMap project
http://www.b4x.com/forum/chit-chat/3553-mapping.html :sign0188:
for zooming you use the dzImage DLL instead of mapDisplay.Zoom(zoom.Value) from ImageLibEx.
Is that because the increasing memory consumption with every zoom action?
That is what happens with my FS Loox 720 Win 2003 SE. and as well on the desktop.
So for zooming I use dzImage as well.
But with it I have also problems.
The jpg map inflatet to bitmap is about 1.3 MByte.
With a zoom of 160 % I get a "OutOfMemoryException"
With a zoom of 100 % i have 22 MB of free memory.
With a zoom of 120 % i have 21.6 MB of free memory.
With a zoom of 140 % i have 20.9 MB of free memory.
With a zoom of "160 %" (which didn't zoom) i have 20.9 MB of free memory as well after the error message.
The same image viewed and zoomed with other apps as "TCPMP" or "Album für Pocket PC" is no problem at all.
With this apps a zoom doesn't even change the use of memory.
As well they don't keep a copy of the original image for zooming.
(if I load the image with my app memory decreases by ~2.6 MB.
with these other apps by ~1.3 MB) (the used image is included in the above project:"Ozi Files Viewer")
:sign0085:
Are there different strategies with zooming?
Am I doing something wrong?
and does anybody know a way for me to achieve higher zoom levels without needing an other image file?
ZPktX is the zoom point (middle of screen)
B4X:
mapDisplay.New3(il1.Item(0))
drwDisplay.New2(mapDisplay.Value) ' DrawerEx drawer object to draw onto the map image
drwMap.New1("frmMap",False) ' drawer object to draw the part of the map image onto the form
BiExZoom.New3(mapDisplay.Value) ' BitmapEx copy for zooming
frmMap.Refresh
.
.
.
'zoom:
mapDisplay.Value=dzImage.ZoomImage(BiExZoom.Value,numZoom.Value)
rectSrc.x = -(ZPktX -ZPktX *numZoom.Value/100) ' keep centering on the zoom point
rectSrc.y = -(ZPktY -ZPktY *numZoom.Value/100 )
drwMap.DrawImage(mapDisplay.Value,rectSrc.Value,rectDest.Value,False)
frmMap.Refresh
Thanks a lot for any hints
Bernd