Skip to content

how to change the thickness of BlackFrame #9

@Roveeen

Description

@Roveeen

hello, I want to change the thickness of the blackframe,like the following picture:
code01

it's 1/10 of the width (default is 1/4 ).

i cannot really understand CoreAR lib,
I had do something like :
in "codeImageTemplate.c"


CRCodeImageTemplate *CRCreateCodeImageTemplate(unsigned char *pixel, int width, int height) {

CRCodeImageTemplate *p = (CRCodeImageTemplate*)malloc(sizeof(CRCodeImageTemplate));

float offsetX = width *1/ 10;
float offsetY = height *1/ 10;

int decodePixelBuff = CRGetDecodePixelBuffWidthHeight();

float samplingWidth = (float)width *8/ 10 / (decodePixelBuff);
float samplingHeight = (float)height*8/ 10 / (decodePixelBuff);
    ....

original:

CRCodeImageTemplate *CRCreateCodeImageTemplate(unsigned char *pixel, int width, int height) {

CRCodeImageTemplate *p = (CRCodeImageTemplate*)malloc(sizeof(CRCodeImageTemplate));

float offsetX = width *1/ 4;
float offsetY = height *1/ 4;

int decodePixelBuff = CRGetDecodePixelBuffWidthHeight();

float samplingWidth = (float)width *1/ 2 / (decodePixelBuff);
float samplingHeight = (float)height*1/ 2 / (decodePixelBuff);
    ....

but it does not work.

can you tell me , how to do?

I'm very grateful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions