-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8f2f4a
commit aac13c6
Showing
25 changed files
with
362 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/target/ | ||
/.settings/ | ||
*.classpath | ||
*.project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.sshtools</groupId> | ||
<artifactId>jsixel-tests</artifactId> | ||
<version>0.0.3-SNAPSHOT</version> | ||
<relativePath>../</relativePath> | ||
</parent> | ||
<artifactId>jsixel-zxing-tests</artifactId> | ||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>jsixel-zxing</artifactId> | ||
<version>${project.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>jsixel-lib-tests</artifactId> | ||
<version>${project.version}</version> | ||
<scope>test</scope> | ||
<classifier>tests</classifier> | ||
</dependency> | ||
</dependencies> | ||
</project> |
34 changes: 34 additions & 0 deletions
34
tests/zxing-tests/src/test/java/com/sshtools/jsixel/zxing/ZxingImageBitmapTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.sshtools.jsixel.zxing; | ||
|
||
import org.junit.Test; | ||
|
||
import com.google.zxing.BarcodeFormat; | ||
import com.sshtools.jsixel.lib.AbstractImageBitmapTests; | ||
import com.sshtools.jsixel.lib.bitmap.Bitmap2Sixel; | ||
|
||
public class ZxingImageBitmapTest extends AbstractImageBitmapTests { | ||
|
||
@Test | ||
public void testQR() throws Exception { | ||
compare("/results/test.qr.sixel", new Bitmap2Sixel.Bitmap2SixelBuilder(). | ||
fromBitmap(new ZxingBitmap.ZxingBitmapBuilder(). | ||
withWidth(256). | ||
withHeight(256). | ||
fromStream(ZxingImageBitmapTest.class.getResourceAsStream("/test.qr.data")). | ||
build()). | ||
build()); | ||
} | ||
|
||
@Test | ||
public void testEAN13() throws Exception { | ||
compare("/results/test.ean13.sixel", new Bitmap2Sixel.Bitmap2SixelBuilder(). | ||
fromBitmap(new ZxingBitmap.ZxingBitmapBuilder(). | ||
withFormat(BarcodeFormat.EAN_13). | ||
withWidth(256). | ||
withHeight(128). | ||
fromContent("123456789012"). | ||
build()). | ||
build()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Pq"1;1;256;128#0;2;0;0;0#1;2;0;0;0#2;2;1;1;1#3;2;1;1;1#4;2;2;2;2#5;2;2;2;2#6;2;2;2;2#7;2;3;3;3#8;2;3;3;3#9;2;4;4;4#10;2;4;4;4#11;2;4;4;4#12;2;5;5;5#13;2;5;5;5#14;2;5;5;5#15;2;6;6;6#16;2;6;6;6#17;2;7;7;7#18;2;7;7;7#19;2;7;7;7#20;2;8;8;8#21;2;8;8;8#22;2;9;9;9#23;2;9;9;9#24;2;9;9;9#25;2;10;10;10#26;2;10;10;10#27;2;11;11;11#28;2;11;11;11#29;2;11;11;11#30;2;12;12;12#31;2;12;12;12#32;2;13;13;13#33;2;13;13;13#34;2;13;13;13#35;2;14;14;14#36;2;14;14;14#37;2;15;15;15#38;2;15;15;15#39;2;15;15;15#40;2;16;16;16#41;2;16;16;16#42;2;16;16;16#43;2;17;17;17#44;2;17;17;17#45;2;18;18;18#46;2;18;18;18#47;2;18;18;18#48;2;19;19;19#49;2;19;19;19#50;2;20;20;20#51;2;20;20;20#52;2;20;20;20#53;2;21;21;21#54;2;21;21;21#55;2;22;22;22#56;2;22;22;22#57;2;22;22;22#58;2;23;23;23#59;2;23;23;23#60;2;24;24;24#61;2;24;24;24#62;2;24;24;24#63;2;25;25;25#64;2;25;25;25#65;2;25;25;25#66;2;26;26;26#67;2;26;26;26#68;2;27;27;27#69;2;27;27;27#70;2;27;27;27#71;2;28;28;28#72;2;28;28;28#73;2;29;29;29#74;2;29;29;29#75;2;29;29;29#76;2;30;30;30#77;2;30;30;30#78;2;31;31;31#79;2;31;31;31#80;2;31;31;31#81;2;32;32;32#82;2;32;32;32#83;2;33;33;33#84;2;33;33;33#85;2;33;33;33#86;2;34;34;34#87;2;34;34;34#88;2;35;35;35#89;2;35;35;35#90;2;35;35;35#91;2;36;36;36#92;2;36;36;36#93;2;36;36;36#94;2;37;37;37#95;2;37;37;37#96;2;38;38;38#97;2;38;38;38#98;2;38;38;38#99;2;39;39;39#100;2;39;39;39#101;2;40;40;40#102;2;40;40;40#103;2;40;40;40#104;2;41;41;41#105;2;41;41;41#106;2;42;42;42#107;2;42;42;42#108;2;42;42;42#109;2;43;43;43#110;2;43;43;43#111;2;44;44;44#112;2;44;44;44#113;2;44;44;44#114;2;45;45;45#115;2;45;45;45#116;2;45;45;45#117;2;46;46;46#118;2;46;46;46#119;2;47;47;47#120;2;47;47;47#121;2;47;47;47#122;2;48;48;48#123;2;48;48;48#124;2;49;49;49#125;2;49;49;49#126;2;49;49;49#127;2;50;50;50#128;2;50;50;50#129;2;51;51;51#130;2;51;51;51#131;2;51;51;51#132;2;52;52;52#133;2;52;52;52#134;2;53;53;53#135;2;53;53;53#136;2;53;53;53#137;2;54;54;54#138;2;54;54;54#139;2;55;55;55#140;2;55;55;55#141;2;55;55;55#142;2;56;56;56#143;2;56;56;56#144;2;56;56;56#145;2;57;57;57#146;2;57;57;57#147;2;58;58;58#148;2;58;58;58#149;2;58;58;58#150;2;59;59;59#151;2;59;59;59#152;2;60;60;60#153;2;60;60;60#154;2;60;60;60#155;2;61;61;61#156;2;61;61;61#157;2;62;62;62#158;2;62;62;62#159;2;62;62;62#160;2;63;63;63#161;2;63;63;63#162;2;64;64;64#163;2;64;64;64#164;2;64;64;64#165;2;65;65;65#166;2;65;65;65#167;2;65;65;65#168;2;66;66;66#169;2;66;66;66#170;2;67;67;67#171;2;67;67;67#172;2;67;67;67#173;2;68;68;68#174;2;68;68;68#175;2;69;69;69#176;2;69;69;69#177;2;69;69;69#178;2;70;70;70#179;2;70;70;70#180;2;71;71;71#181;2;71;71;71#182;2;71;71;71#183;2;72;72;72#184;2;72;72;72#185;2;73;73;73#186;2;73;73;73#187;2;73;73;73#188;2;74;74;74#189;2;74;74;74#190;2;75;75;75#191;2;75;75;75#192;2;75;75;75#193;2;76;76;76#194;2;76;76;76#195;2;76;76;76#196;2;77;77;77#197;2;77;77;77#198;2;78;78;78#199;2;78;78;78#200;2;78;78;78#201;2;79;79;79#202;2;79;79;79#203;2;80;80;80#204;2;80;80;80#205;2;80;80;80#206;2;81;81;81#207;2;81;81;81#208;2;82;82;82#209;2;82;82;82#210;2;82;82;82#211;2;83;83;83#212;2;83;83;83#213;2;84;84;84#214;2;84;84;84#215;2;84;84;84#216;2;85;85;85#217;2;85;85;85#218;2;85;85;85#219;2;86;86;86#220;2;86;86;86#221;2;87;87;87#222;2;87;87;87#223;2;87;87;87#224;2;88;88;88#225;2;88;88;88#226;2;89;89;89#227;2;89;89;89#228;2;89;89;89#229;2;90;90;90#230;2;90;90;90#231;2;91;91;91#232;2;91;91;91#233;2;91;91;91#234;2;92;92;92#235;2;92;92;92#236;2;93;93;93#237;2;93;93;93#238;2;93;93;93#239;2;94;94;94#240;2;94;94;94#241;2;95;95;95#242;2;95;95;95#243;2;95;95;95#244;2;96;96;96#245;2;96;96;96#246;2;96;96;96#247;2;97;97;97#248;2;97;97;97#249;2;98;98;98#250;2;98;98;98#251;2;98;98;98#252;2;99;99;99#253;2;99;99;99#254;2;100;100;100#255;2;100;100;100#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33~??~~??!4~??!4~!4?~~!8?~~??!4~!6?~~??~~!4?!6~??!8~??~~??!4~??!6~??~~??~~??~~??!4~??!6~!6?~~??!4~!6?!4~??~~!4?!4~!4?~~!4?~~!4?!4~??!4~??!6~??~~??!33~$#255!33?~~??~~!4?~~!4?!4~??!8~??~~!4?!6~??~~??!4~!6?~~!8?~~??~~!4?~~!6?~~??~~??~~??~~!4?~~!6?!6~??~~!4?!6~!4?~~??!4~!4?!4~??!4~??!4~!4?~~!4?~~!6?~~??~~-#0!33B??BB??!4B??!4B!4?BB!8?BB??!4B!6?BB??BB!4?!6B??!8B??BB??!4B??!6B??BB??BB??BB??!4B??!6B!6?BB??!4B!6?!4B??BB!4?!4B!4?BB!4?BB!4?!4B??!4B??!6B??BB??!33B$#255!33?BB??BB!4?BB!4?!4B??!8B??BB!4?!6B??BB??!4B!6?BB!8?BB??BB!4?BB!6?BB??BB??BB??BB!4?BB!6?!6B??BB!4?!6B!4?BB??!4B!4?!4B??!4B??!4B!4?BB!4?BB!6?BB??BB\ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/target/ | ||
/.settings/ | ||
*.project | ||
*.classpath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# jsixel-zxing | ||
|
||
This module lets you lets you encode 1D and 2D barcodes produced by the [Zxing](https://github.com/zxing/zxing). | ||
|
||
*[Back To JSixel](../README.md)* | ||
|
||
## Quick Start | ||
|
||
```xml | ||
<dependency> | ||
<groupId>com.sshtools</groupdId> | ||
<artifactId>jsixel-zxing</artifactId> | ||
<version>0.0.2-SNAPSHOT</version> | ||
</dependency> | ||
``` | ||
|
||
### JPMS | ||
|
||
```java | ||
requires transitive com.sshtools.jsixel.zxing; | ||
``` | ||
|
||
## Barcode -> Sixel | ||
|
||
To convert an image in `PNG`, `JPEG` or `BMP` format to a sixel stream. | ||
|
||
```java | ||
|
||
// Create the image codec | ||
var codec = new SlimCodec(); | ||
|
||
try (var in = Jsixel.class.getResourceAsStream("jsixel.png")) { | ||
// Load the image | ||
var bitmap = codec.load(Optional.of(ImageType.PNG), in); | ||
|
||
// Build a sixel encoder | ||
var enc = new Bitmap2SixelBuilder(). | ||
fromBitmap(bitmap). | ||
build(); | ||
|
||
// Write the converted buffer to your output stream | ||
conv.write(System.out); | ||
} | ||
|
||
``` | ||
|
||
## Sixel -> Barcode | ||
|
||
Not supported. |
Oops, something went wrong.