Custom QR Code

פרמיום
על ידי unitag | מְעוּדכָּן לפני 20 ימים | Tools
פּוֹפּוּלָרִיוּת

8.5 / 10

חֶבִיוֹן

3,591ms

רמת שירות

100%

חזרה לכל הדיונים

Java sample for API usage and embedding jpg logo into the QR code

H
headsapp
לפני 5 שנים

Hi, it’s not clear to me how to send the Logo so it could be embedded into the QR code.
Let’s say I have a jpg or png image which i would like to embed into the QR code,

Could you please share some java code example for configuring the http request to achieve that.
Also would be nice to see example of changing colors, etc…

Thank you in advance,
Vladimir

E
errosan commented לפני 5 שנים

Add this to your setting JSON string before the closing parenthesis:

, "LOGO" : {"L_NAME"  :  "url_to_your_logo_image", "EXCAVATE" : true}

L_NAME is the url to your hosted image.
EXCAVATE instructs the API to remove the dark blocks from behind the logo image.

Using the default example, it would look like this (formatted):

{
    "LAYOUT" : {
        "COLORBG" : "ffffff",
        "GRADIENT_TYPE" : "NO_GR",
        "COLOR1" : "000000"
    },
    "EYES" : {
        "EYE_TYPE" : "Simple"
    },
    "E" : "M",
    "BODY_TYPE" : 0,
    "LOGO" : {
        "L_NAME"  :  "url_to_your_logo_image",
        "EXCAVATE" : true
    }
}
U
unitag commented לפני 5 שנים

Hi!

Thanks errosan for the reply. This is the correct way to do it.

Alexis.

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות
דירוג: 5 - הצבעות: 1