Thumbnail of Images to select, how ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Thumbnail of Images to select, how ?

Post by AUGE_OHR »

hi,

when have Picture i want to have Image while File-Name can be random.
while i can´t figure out how to use LVS_ICON Style in GRID i think about a Workaround.

using a FOR/NEXT loop i can create IMAGE ... but how to "mark" them :idea:
how can i "show" that IMAGE is "marked" to copy those File in next Step

while IMAGE are much bigger than Thumbs i need to "re-size" them.

Code: Select all

Function BT_BitmapLoadFile (cFileName) -> hBitmap
Function BT_BitmapCopyAndResize(hBitmap, New_Width, New_Height, Mode_Stretch, Algorithm)
Function BT_HMGSetImage (cFormName, cControlName, hBitmap, lReleasePreviousBitmap)
have somebody already made something like this using HMG :?:
have fun
Jimmy
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Thumbnail of Images to select, how ?

Post by danielmaximiliano »

I do not really understand what you want to do, if it is to show the thumbnails that are in your DCIM folder of your cell phone and to be able to select and choose which image to copy, I think it is necessary to get that information from Thumb.db where the image is associated with its size characteristics. , name, creation date, etc, etc
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: Thumbnail of Images to select, how ?

Post by andyglezl »

\HMG\3.4.4\SAMPLES\BosTaurus\Demo13.prg
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Thumbnail of Images to select, how ?

Post by AUGE_OHR »

hi,
danielmaximiliano wrote: Mon Mar 30, 2020 1:49 pm I do not really understand what you want to do, if it is to show the thumbnails that are in your DCIM folder of your cell phone and to be able to select and choose which image to copy, I think it is necessary to get that information from Thumb.db where the image is associated with its size characteristics. , name, creation date, etc, etc
i found a Way to get Information to build a "Thumb-Preview" with IMAGE.
but i have to copy / stream file to real Folder which is not to slow.

now i ask for a Way to "mark" those Image for "select" and move/rename them to other Folder.
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Thumbnail of Images to select, how ?

Post by AUGE_OHR »

andyglezl wrote: Mon Mar 30, 2020 3:15 pm \HMG\3.4.4\SAMPLES\BosTaurus\Demo13.prg
aha ... get DC of Image and draw a Text "into" :D
ok ... is there a "BT_FrameXXX" that i can use :idea:
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Thumbnail of Images to select, how ?

Post by AUGE_OHR »

hi,

i have try Sample \HMG\3.4.4\SAMPLES\BosTaurus\Demo13.prg
i have modify it to use just a Color-Frame around Image
Select_FrameColor.JPG
Select_FrameColor.JPG (20.3 KiB) Viewed 1767 times
now my Question is : how to identify which is marked :idea:
how can i (easy) get Frame-Color ... don´t like to use GETPIXEL() for it ...
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Thumbnail of Images to select, how ?

Post by AUGE_OHR »

hi,

ok, i got a Way with a seperat Array which hold Number of marked Image.

now i have a Question to "speed up" this Code

Code: Select all

      FOR xx := 1 TO xMax
         YY := 1
         FOR YY := 1 TO yMax
            DEFINE IMAGE &cLabel
               ...
            END IMAGE 
         NEXT
      NEXT
it take about 12 Sec. to "load" 105 Image which are 25 MB ... is this "normal" :?:

i try 2 different Way but time is about same +- 1 Sec

Code: Select all

       PICTURE cPath + aDir[ nCount ] [ 1 ]
i wonder that it does resize Image to Thumbs size :D

Code: Select all

       hBitmap1_aux := BT_BitmapLoadFile( cPath + aDir[ nCount ] [ 1 ] )
       hBitmap1 := BT_BitmapCopyAndResize( hBitmap1_aux, 128, 128, NIL, BT_RESIZE_HALFTONE )
       BT_BitmapRelease( hBitmap1_aux )
       BT_HMGSetImage( "THUMBSWIN", cLabel, hBitmap1 )
this Version is a bit quicker (11 Sec.) but as i use "fix" Size (128,128) it will "Stretch" Image on Thumb.

but 12 Seconds is a long Time for 105 Image ... what if have 1000 Image or more ... :idea:
have fun
Jimmy
Post Reply