Skip to content
Snippets Groups Projects
Select Git revision
  • bab169df1851dc6b10e5cddb4b2d518cad68ac54
  • master default protected
  • release/202005
  • release/202001
  • release/201912
  • release/201911
  • release/201910
  • release/201908
  • release/201906
  • release/201905
  • release/201904
  • release/201903
  • release/201902
  • release/201901
  • release/201812
  • release/201811
  • release/201808
  • releases/beta1
  • packaging
  • native
  • release-0.2.x
  • 1.0.0
  • 0.2.0
  • 0.1.1
  • 0.1.0
25 results

selectareadialog.cpp

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    qrenc.c 29.33 KiB
    /**
     * qrencode - QR Code encoder
     *
     * QR Code encoding tool
     * Copyright (C) 2006-2013 Kentaro Fukuchi <kentaro@fukuchi.org>
     *
     * This library is free software; you can redistribute it and/or
     * modify it under the terms of the GNU Lesser General Public
     * License as published by the Free Software Foundation; either
     * version 2.1 of the License, or any later version.
     *
     * This library is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
     * Lesser General Public License for more details.
     *
     * You should have received a copy of the GNU Lesser General Public
     * License along with this library; if not, write to the Free Software
     * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
     */
    
    #if HAVE_CONFIG_H
    # include "config.h"
    #endif
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <png.h>
    #include <getopt.h>
    #include <fcntl.h>
    #include <io.h>
    
    #include "qrencode.h"
    
    #define INCHES_PER_METER (100.0/2.54)
    
    static int casesensitive = 1;
    static int eightbit = 0;
    static int version = 0;
    static int size = 3;
    static int margin = -1;
    static int dpi = 72;
    static int structured = 0;
    static int rle = 0;
    static int micro = 0;
    static QRecLevel level = QR_ECLEVEL_L;
    static QRencodeMode hint = QR_MODE_8;
    static unsigned int fg_color[4] = {0, 0, 0, 255};
    static unsigned int bg_color[4] = {255, 255, 255, 255};
    
    static int verbose = 0;
    
    enum imageType {
    	PNG_TYPE,
    	EPS_TYPE,
    	SVG_TYPE,
    	ANSI_TYPE,
    	ANSI256_TYPE,
    	ASCII_TYPE,
    	ASCIIi_TYPE,
    	UTF8_TYPE,
    	ANSIUTF8_TYPE
    };
    
    static enum imageType image_type = PNG_TYPE;
    
    static const struct option options[] = {
    	{"help"         , no_argument      , NULL, 'h'},
    	{"output"       , required_argument, NULL, 'o'},
    	{"level"        , required_argument, NULL, 'l'},