Welcome! Log In Create A New Profile

Advanced

[WM] Reading QR code from file

Posted by infos 
[WM] Reading QR code from file
October 14, 2025 05:28PM
Hi
How to load QR code from image or file using WM application?
Has anyone done this?
Re: [WM] Reading QR code from file
October 17, 2025 10:47AM
Hello Infos.
Yes, this is certainly possible. Here is your code below. This coded in Windev.
The QRCode file/image needs to be in the correct format so that it can be recognized properly.
Remember, I coded this in Windev 2025. I don't know if this code is supported in earlier versions.
Regards !

QRCode example (Save it somewhere for test)

//sImage is string = fSelect(fexedir(), "", "Odaberite QR Code", "*.png"+cr+"*.jpg", "png") // For Windev
sImage is string = AlbumPicker(albumImage) // For Mobile
IF sImage = "" THEN
ToastDisplay("Niste odabrali sliku", toastShort, vaMiddle, haCenter)
RETURN
END

bc is BarCode
bc = BCDecode(sImage)
IF ErrorOccurred = False _AND_ bc.TypeBarCode = BC_QRCODE
Info("QR kod uspješno pročitan!" + CR + "Sadržaj: " + bc.Content)
Info(bc.TypeBarCode, bc.ContentType, bc.Content )
IF Lower(Left(bc.Content,4)) = "http" THEN
ShellExecute(bc.Content)
END
ELSE
Error("Nije moguće pročitati QR kod sa slike." + CR + "Mogući razlozi: neispravan format, loša kvaliteta slike, ili nepostojanje QR koda.")
END



Edited 5 time(s). Last edit at 10/17/2025 11:07AM by IsmirB.
Re: [WM] Reading QR code from file
October 19, 2025 01:59PM
Thanks Ismir, this works great.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: