QREncoder.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #import <Foundation/Foundation.h>
  2. #import <UIKit/UIKit.h>
  3. #import <CommonCrypto/CommonCryptor.h>
  4. #include "QR_Encode.h"
  5. #import "DataMatrix.h"
  6. const static int QR_ECLEVEL_AUTO = 0;
  7. const static int QR_ECLEVEL_H = QR_LEVEL_H;
  8. const static int QR_ECLEVEL_M = QR_LEVEL_M;
  9. const static int QR_ECLEVEL_L = QR_LEVEL_L;
  10. const static int QR_ECLEVEL_Q = QR_LEVEL_Q;
  11. const static int QR_VERSION_AUTO = -1;
  12. const static int BITS_PER_BYTE = 8;
  13. const static int BYTES_PER_PIXEL = 4;
  14. const static unsigned char WHITE = 0xff;
  15. @interface QREncoder : NSObject {
  16. }
  17. + (DataMatrix*)encodeWithECLevel:(int)ecLevel version:(int)version string:(NSString *)string AESPassphrase:(NSString*)AESPassphrase;
  18. + (DataMatrix*)encodeWithECLevel:(int)ecLevel version:(int)version string:(NSString*)string;
  19. + (UIImage*)renderDataMatrix:(DataMatrix*)matrix imageDimension:(int)imageDimension;
  20. + (UIImage*)renderDataMatrix:(DataMatrix*)matrix imageDimension:(int)imageDimension transparent:(BOOL)transparent;
  21. @end
  22. void FLProviderReleaseData(void *info, const void *data, size_t size);