Thanks infratec I will try to see if the qrcode is readable after including another imageinfratec wrote:That's very 'Basic'Code: Select all
If OpenWindow(0, 0, 0, 400, 100, "ImageGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) If LoadImage(0, #PB_Compiler_Home + "Examples\Sources\Data\PureBasicLogo.bmp") If CreateImage(1, 80, 50, 24, #Red) If StartDrawing(ImageOutput(0)) DrawImage(ImageID(1), 80, 15) StopDrawing() EndIf EndIf ImageGadget(0, 10, 10, 0, 0, ImageID(0)) EndIf Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf
Create QRCode (2D-Barcode)
-
- Enthusiast
- Posts: 501
- Joined: Tue Oct 14, 2014 12:09 pm
Re: Create QRCode (2D-Barcode)
-
- Enthusiast
- Posts: 501
- Joined: Tue Oct 14, 2014 12:09 pm
Re: Create QRCode (2D-Barcode)
Can someone help me on How to decode a qrcode with Purebasic. With zbarimg some image can be decodeand other one no
THanks
THanks
Re: Create QRCode (2D-Barcode)
Could you please provide us an image?
I have tested ZBar and Pb 5.73B3 x86 and everything seems to work..
I have tested ZBar and Pb 5.73B3 x86 and everything seems to work..
"Daddy, I'll run faster, then it is not so far..."
-
- Enthusiast
- Posts: 501
- Joined: Tue Oct 14, 2014 12:09 pm
Re: Create QRCode (2D-Barcode)
Extraction de l'image faite avec PDFImages
LIens
http://www.sepa-convertir.ch/utilitaire ... cture2.pdf
http://www.sepa-convertir.ch/utilitaire ... /toto2.png
the PDF invoice2.pdf has been processed with PDFCAIRO and the result can be found in
Resultat dans toto.png
Phaseun
Hoping that this will be enough for you
LIens
http://www.sepa-convertir.ch/utilitaire ... cture2.pdf
http://www.sepa-convertir.ch/utilitaire ... /toto2.png
the PDF invoice2.pdf has been processed with PDFCAIRO and the result can be found in
Resultat dans toto.png
Phaseun
Code: Select all
pdftocairo -png -cropbox -x 380 -y 1220 -H 300 -W 298 -gray -transp facture2.pdf
zbarimg.exe -D toto.png
Re: Create QRCode (2D-Barcode)
I told you already that the quality of the image inside of the PDF is bad and the extracted image is even worse.
You have to put the generated code in 100% quality inside the PDF.
You have to put the generated code in 100% quality inside the PDF.
-
- Enthusiast
- Posts: 501
- Joined: Tue Oct 14, 2014 12:09 pm
Re: Create QRCode (2D-Barcode)
infratec wrote:I told you already that the quality of the image inside of the PDF is bad and the extracted image is even worse.
You have to put the generated code in 100% quality inside the PDF.
I know that. I tried to improve the quality of the PDF with GHOSTSCRIPT but it doesn't work. The problem I have is related to ZBARIMAGE (problem already raised in 2017 on the ZBAR forum but not solved to date)
For your information, the file facture2.pdf comes from the validation site of SIX Switzerland, which means that I don't have the hand on the creation of this PDF. I have to treat it as it is. What I don't understand is that software like PDFCandy treats the conversion of the PDF facture2 without any problem into PNG and then the PNG is treated as a QRCODE.
Have you a solution to generated code in 100% quality inside the PDF. ?
I am ready to buy a command line tools for converting PDF into QRCODE via img
Re: Create QRCode (2D-Barcode)
The PDF format is simply an encapsulation of elements. Text is converted, but images remain in their original format (jpg, bmp, png etc). It is thus enough to extract the whole (provided that the elements are not encrypted).... converting PDF into QRCODE via img...
Do not try to convert a whole PDF file into a single image: this is the worst way to destroy the quality of the original images, thus making QRCodes unreadable.
Extract images from PDF file: There are free tools that do it very well
One of them (freeware)
https://www.pdfarea.com/PDF-Image-Extractor.htm
(There are also probably some available on the command line.)
It does extract the QRCode given in your example. But I was only able to read it one time out of 10 with my phone (while all the other QRCodes I usually read work).
@loulou2522
You had to create another topic, because your question is about reading and not about creating a QRCode