File path for GetImageDimensions

Scantech

Well-Known Member
Licensed User
Longtime User
Hello,

In bitmapPlus how do i use the GetImageDimensions?

I have files in DirAssets and DirRootExternal. How do set the file path?

Directory asset with File Name = Test.png
Directory Root External File Name = Test2.png

I am familiar with this example
GetImageDimensions(Dir as string, FileName as string)
 

JTmartins

Active Member
Licensed User
Longtime User
do you mean

Something like this ?

File.DirAssets, "filename"

and

File.DirDefaultExternal,"filename"
 
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User
This work for external
B4X:
GetImageDimensions(File.DirRootExternal & "/" & "Test.png")

Can't figure out for directory asset. Will not work!
B4X:
GetImageDimensions(File.DirAssets & "/" & "Test.png")
 
Last edited:
Upvote 0

Informatix

Expert
Licensed User
Longtime User
This work for external
B4X:
GetImageDimensions(File.DirRootExternal & "/" & "Test.png")

Can't figure out for directory asset. Will not work!
B4X:
GetImageDimensions(File.DirAssets & "/" & "Test.png")

I confirm that you cannot read the image dimensions of files in the assets folder. These files, in fact, are compressed with your application. They are not in a folder somewhere on your device. You have to copy them on your device (= to extract them) with File.Copy if you want to read their image dimensions.
 
Upvote 0
Top