Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
JAVA
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="akhilapraveen" data-source="post: 10746282" data-attributes="member: 104181"><p>Ya machan you can do it! There are 2 ways to do t</p><p>1.microchip programming.</p><p>2.Picture scanning</p><p></p><p>Second one is the easiest way and its used by many phone applications</p><p></p><p>Ill explain how to do t,</p><p></p><p>First Download Library file from here</p><p><a href="http://code.google.com/p/zxing/downloads/detail?name=ZXing-1.6.zip&can=2&q=" target="_blank">http://code.google.com/p/zxing/downloads/detail?name=ZXing-1.6.zip&can=2&q=</a></p><p>(hope you know how to import a lib file)</p><p>//-------------------------------------------------------------------</p><p>InputStream barCodeInputStream = new FileInputStream("file.jpg");</p><p>BufferedImage barCodeBufferedImage = ImageIO.read(barCodeInputStream);</p><p></p><p>LuminanceSource source = new BufferedImageLuminanceSource(barCodeBufferedImage);</p><p>BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));</p><p>Reader reader = new MultiFormatReader();</p><p>Result result = reader.decode(bitmap);</p><p></p><p>System.out.println("Barcode text is " + result.getText());</p><p>//-------------------------------------------------------------</p><p></p><p></p><p>IF YOU WANNA WRITE A BARCODE FROM JAVA, THIS IS HOW YOU DO IT</p><p></p><p>String text = "98376373783"; // this is the text that we want to encode</p><p></p><p>int width = 400;</p><p>int height = 300; // change the height and width as per your requirement</p><p></p><p>// (ImageIO.getWriterFormatNames() returns a list of supported formats)</p><p>String imageFormat = "png"; // could be "gif", "tiff", "jpeg" </p><p></p><p>BitMatrix bitMatrix = new QRCodeWriter().encode(text, BarcodeFormat.QR_CODE, width, height);</p><p>MatrixToImageWriter.writeToStream(bitMatrix, imageFormat, new FileOutputStream(new File("qrcode_97802017507991.png")));</p><p></p><p></p><p></p><p>HOPE THIS WILL HELP YOU IN SOME WAY!</p></blockquote><p></p>
[QUOTE="akhilapraveen, post: 10746282, member: 104181"] Ya machan you can do it! There are 2 ways to do t 1.microchip programming. 2.Picture scanning Second one is the easiest way and its used by many phone applications Ill explain how to do t, First Download Library file from here [url]http://code.google.com/p/zxing/downloads/detail?name=ZXing-1.6.zip&can=2&q=[/url] (hope you know how to import a lib file) //------------------------------------------------------------------- InputStream barCodeInputStream = new FileInputStream("file.jpg"); BufferedImage barCodeBufferedImage = ImageIO.read(barCodeInputStream); LuminanceSource source = new BufferedImageLuminanceSource(barCodeBufferedImage); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); Reader reader = new MultiFormatReader(); Result result = reader.decode(bitmap); System.out.println("Barcode text is " + result.getText()); //------------------------------------------------------------- IF YOU WANNA WRITE A BARCODE FROM JAVA, THIS IS HOW YOU DO IT String text = "98376373783"; // this is the text that we want to encode int width = 400; int height = 300; // change the height and width as per your requirement // (ImageIO.getWriterFormatNames() returns a list of supported formats) String imageFormat = "png"; // could be "gif", "tiff", "jpeg" BitMatrix bitMatrix = new QRCodeWriter().encode(text, BarcodeFormat.QR_CODE, width, height); MatrixToImageWriter.writeToStream(bitMatrix, imageFormat, new FileOutputStream(new File("qrcode_97802017507991.png"))); HOPE THIS WILL HELP YOU IN SOME WAY! [/QUOTE]
Insert quotes…
Verification
Winadiyakata thappara keeyak tibeda?
Post reply
Top
Bottom