Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
??? Undefined function or method 'BufferedImageLuminanceSource' for input arguments of type
'java.awt.image.BufferedImage'.
Error in ==> decode_qr at 55
 source =BufferedImageLuminanceSource(jimg);
Posted

1 solution

Hello, you have to download the 3.3 jars from (https://repo1.maven.org/maven2/com/google/zxing/javase/3.3.0/ and https://repo1.maven.org/maven2/com/google/zxing/core/3.3.0/). These functions are inside differente folders for this matlab code, so you have to change the imports in this way:

For encode function:
import com.google.zxing.qrcode.*;
import com.google.zxing.*;

For decode function:
import com.google.zxing.qrcode.*;
import com.google.zxing.client.j2se.*;
import com.google.zxing.*;
import com.google.zxing.common.*;
import com.google.zxing.Result.*;

There are another changes to do:
in function encode M_java.height and M_java.width are invalid, instead use M_java.getHeight(), M_java.getWidth()

Special thanks for Ari Bejarano (the Java's Master) and to Andres Puerto for developing this solution.
 
Share this answer
 
Comments
OriginalGriff 16-Sep-17 3:35am    
Be aware that reopening 3 year old questions is a dangerous tactic: it looks like rep point farming to many people and that is a form of abuse which will get you banned from the site.
Is it realistic to think that the user is still stuck on this problem after so long a time period?
In this case, I think it's probably not deliberate, but there are some very trigger-happy people here who will not view similar activity the same way...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900