-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1271 lines (1104 loc) · 43 KB
/
index.html
File metadata and controls
1271 lines (1104 loc) · 43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kindle Lockscreen Creator</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<!-- FontAwesome Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Roboto", sans-serif;
background: linear-gradient(to bottom right, #1e1e2e, #181825, #11111b);
color: #cdd6f4;
min-height: 100vh;
padding: 2rem;
}
.bebas-neue {
font-family: "Bebas Neue", sans-serif;
font-weight: 400;
font-style: normal;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
.header {
text-align: center;
margin-bottom: 2rem;
}
.header h1 {
font-size: 3rem;
font-weight: bold;
margin-bottom: 0.5rem;
background: linear-gradient(to right, #89b4fa, #cba6f7);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.header p {
color: #bac2de;
}
.section-card {
background-color: #313244;
border: 1px solid #45475a;
border-radius: 0.5rem;
padding: 1.5rem;
margin-bottom: 2rem;
}
.section-title {
font-size: 1.5rem;
margin-bottom: 1rem;
}
.collapsible-header {
width: 100%;
padding: 1rem 1.5rem;
display: flex;
align-items: center;
justify-content: space-between;
background: transparent;
border: none;
border-radius: 0.5rem;
color: inherit;
cursor: pointer;
transition: background-color 0.2s;
}
.collapsible-header:hover {
background-color: #45475a;
border-radius: 0.5rem;
}
.collapsible-header.active {
background-color: #45475a;
border-radius: 0.5rem;
}
.collapsible-title {
display: flex;
align-items: center;
gap: 0.75rem;
}
.collapsible-content {
display: none;
padding: 0 1.5rem 1.5rem;
}
.collapsible-content.active {
display: block;
}
.alert-box {
border-radius: 0.5rem;
padding: 1rem;
margin-bottom: 1.5rem;
border: 1px solid;
}
.alert-warning {
background-color: #3e2a1f;
border-color: #fab387;
color: #f9e2af;
}
.alert-danger {
background-color: #3a1f28;
border-color: #f38ba8;
color: #eba0ac;
}
.alert-info {
background-color: #1f2d3a;
border-color: #89b4fa;
color: #89dceb;
}
.alert-title {
display: flex;
align-items: flex-start;
gap: 0.5rem;
font-weight: 600;
margin-bottom: 0.5rem;
}
.alert-title svg {
flex-shrink: 0;
margin-top: 2px;
}
.alert-warning .alert-title {
color: #fab387;
}
.alert-danger .alert-title {
color: #f38ba8;
}
.alert-info .alert-title {
color: #89b4fa;
}
.instruction-step {
margin-bottom: 1.5rem;
}
.instruction-step h3 {
font-size: 1.25rem;
color: #cba6f7;
margin-bottom: 0.5rem;
}
.instruction-step ol,
.instruction-step ul {
margin-left: 1.5rem;
line-height: 1.6;
}
.instruction-step li {
margin-bottom: 0.5rem;
}
.code-block {
background-color: #11111b;
color: #a6e3a1;
padding: 0.75rem 1rem;
border-radius: 0.375rem;
font-family: monospace;
font-size: 0.75rem;
margin-top: 0.5rem;
overflow-x: auto;
}
.inline-code {
background-color: #11111b;
color: #a6e3a1;
padding: 0.125rem 0.5rem;
border-radius: 0.25rem;
font-family: monospace;
font-size: 0.875rem;
}
.link {
color: #89b4fa;
text-decoration: underline;
}
.link:hover {
color: #74c7ec;
}
.grid {
display: grid;
gap: 2rem;
margin-bottom: 2rem;
}
@media (min-width: 768px) {
.grid {
grid-template-columns: repeat(2, 1fr);
}
.preview-panel {
position: sticky;
top: 2rem;
align-self: start;
}
}
.upload-button {
display: block;
width: 100%;
text-align: center;
padding: 0.75rem 1rem;
border-radius: 0.5rem;
font-weight: 600;
background-color: #89b4fa;
color: #1e1e2e;
cursor: pointer;
transition: background-color 0.2s;
border: none;
font-size: 1rem;
}
.upload-button:hover {
background-color: #74c7ec;
}
.file-input {
display: none;
}
.select-input {
width: 100%;
padding: 0.5rem 1rem;
border-radius: 0.375rem;
background-color: #45475a;
border: 1px solid #585b70;
color: #cdd6f4;
cursor: pointer;
font-size: 1rem;
}
.radio-option {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.5rem;
border-radius: 0.375rem;
cursor: pointer;
transition: background-color 0.2s;
margin-bottom: 0.75rem;
}
.radio-option:hover {
background-color: #45475a;
}
.radio-option.active {
background-color: #45475a;
}
.radio-option input[type="radio"] {
width: 1rem;
height: 1rem;
accent-color: #89b4fa;
}
.radio-label {
flex: 1;
}
.radio-label-title {
font-weight: 500;
}
.radio-label-desc {
font-size: 0.875rem;
color: #bac2de;
}
.slider-container {
margin-left: 1.75rem;
margin-top: 1rem;
padding: 0.75rem;
background-color: #45475a;
border-radius: 0.375rem;
display: none;
}
.slider-container.active {
display: block;
}
.slider-group {
margin-bottom: 0.75rem;
}
.slider-group:last-child {
margin-bottom: 0;
}
.slider-group label {
font-size: 0.875rem;
color: #cdd6f4;
display: block;
margin-bottom: 0.25rem;
}
.slider-group input[type="range"] {
width: 100%;
accent-color: #89b4fa;
}
.slider-hint {
font-size: 0.75rem;
color: #9399b2;
margin-top: 0.25rem;
font-style: italic;
}
.checkbox-option {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.5rem;
border-radius: 0.375rem;
cursor: pointer;
transition: background-color 0.2s;
margin-bottom: 1rem;
}
.checkbox-option:hover {
background-color: #45475a;
}
.checkbox-option input[type="checkbox"] {
width: 1rem;
height: 1rem;
accent-color: #89b4fa;
border-radius: 0.25rem;
}
.filename-input-group {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.filename-input-group span {
color: #bac2de;
}
.filename-input-group input {
width: 5rem;
padding: 0.5rem 0.75rem;
background-color: #45475a;
border: 1px solid #585b70;
border-radius: 0.375rem;
color: #cdd6f4;
text-align: center;
font-family: monospace;
}
.info-text {
font-size: 0.875rem;
color: #bac2de;
margin-bottom: 0.5rem;
}
.info-icon-text {
display: flex;
align-items: flex-start;
gap: 0.5rem;
font-size: 0.75rem;
margin-bottom: 0.5rem;
}
.info-icon-text svg {
flex-shrink: 0;
margin-top: 2px;
}
.info-icon-text.warning {
color: #fab387;
}
.info-icon-text.purple {
color: #cba6f7;
}
.download-button {
width: 100%;
font-weight: 600;
padding: 1rem 1.5rem;
border-radius: 0.5rem;
background: linear-gradient(to right, #89b4fa, #cba6f7);
color: #1e1e2e;
border: none;
cursor: pointer;
font-size: 1rem;
transition: all 0.2s;
}
.download-button:hover {
background: linear-gradient(to right, #74c7ec, #b4befe);
transform: scale(1.05);
}
.preview-placeholder {
aspect-ratio: 1072/1448;
background-color: #1e1e2e;
border: 2px dashed #585b70;
border-radius: 0.375rem;
display: flex;
align-items: center;
justify-content: center;
color: #6c7086;
}
.preview-container {
background-color: #1e1e2e;
padding: 1rem;
border-radius: 0.375rem;
display: inline-block;
}
.preview-canvas {
border: 1px solid #585b70;
border-radius: 0.375rem;
display: block;
}
.preview-info {
font-size: 0.875rem;
color: #bac2de;
line-height: 1.5;
}
.preview-info p {
margin-bottom: 0.25rem;
}
.hidden {
display: none !important;
}
.contributor-section {
margin-top: 3rem;
}
.contributor-header {
display: flex;
align-items: flex-start;
gap: 0.75rem;
margin-bottom: 1rem;
}
.contributor-header svg {
flex-shrink: 0;
margin-top: 2px;
}
.contributor-content p {
font-size: 0.875rem;
line-height: 1.6;
margin-bottom: 0.75rem;
}
/* FontAwesome icon sizing */
.alert-title i {
font-size: 20px;
}
.info-icon-text i {
font-size: 16px;
}
.collapsible-title i {
font-size: 24px;
}
#instructions-icon {
font-size: 24px;
}
</style>
</head>
<body>
<div class="container">
<!-- Header -->
<div class="header">
<h1 class="bebas-neue">Kindle Lockscreen Creator</h1>
<p>Formats images for use as custom Kindle lock screens.</p>
</div>
<!-- Installation Instructions -->
<div class="section-card">
<button class="collapsible-header" id="instructions-toggle">
<div class="collapsible-title">
<i class="fa fa-book" style="color: #89b4fa;"></i>
<h2 class="bebas-neue section-title" style="color: #89b4fa; margin: 0;">How to install custom lock screens on your Kindle</h2>
</div>
<i class="fa fa-chevron-down" id="instructions-icon" style="color: #bac2de;"></i>
</button>
<div class="collapsible-content" id="instructions-content">
<br>
<!-- Compatibility Warning -->
<div class="alert-box alert-warning">
<div class="alert-title">
<i class="fa fa-exclamation-triangle"></i>
<span>Important Compatibility Note</span>
</div>
<p style="font-size: 0.875rem;">
This tool currently creates images for the <strong>11th Generation Kindle (2024 Release)</strong> (1072×1448)
and the <strong>1st Generation Kindle Scribe</strong> (1860×2480). Other Kindle models may require different image
dimensions/settings and have not yet been tested with images from this app.
</p>
</div>
<!-- Ads Warning -->
<div class="alert-box alert-danger">
<div class="alert-title">
<i class="fa fa-exclamation-circle"></i>
<span>Critical: Ads Must Be Disabled</span>
</div>
<div style="font-size: 0.875rem;">
<p>Custom lock screen images will <strong>only display when ads are disabled</strong> on your Kindle.</p>
<p style="font-weight: 600; margin-top: 0.5rem;">If you haven't purchased your Kindle yet:</p>
<ul style="margin-left: 1.5rem; margin-top: 0.5rem;">
<li><strong>DO NOT</strong> pay extra for an ad-free Kindle at purchase</li>
<li>Buy the ad-supported version</li>
<li>The current jailbreak method for new Kindles (AdBreak) <strong>requires ads to be present</strong> to work</li>
<li><strong>After jailbreaking</strong>, remove ads from your Kindle</li>
</ul>
<p style="font-style: italic; margin-top: 0.5rem;">
Remember: Jailbreak first (while ads are present), then remove ads.
</p>
</div>
</div>
<!-- Installation Steps -->
<div class="instruction-step">
<h3 class="bebas-neue">Step 1: Jailbreak Your Kindle</h3>
<p style="font-size: 0.875rem; line-height: 1.6;">
Before installing custom lock screen images, you must jailbreak your Kindle. Detailed instructions
for all Kindle models can be found at
<a href="https://kindlemodding.org" target="_blank" class="link">kindlemodding.org</a>.
</p>
</div>
<div class="instruction-step">
<h3 class="bebas-neue">Step 2: Install USBNetLite</h3>
<p style="font-size: 0.875rem; line-height: 1.6;">
Install USBNetLite through KUAL on your jailbroken Kindle. This enables SSH access to your Kindle's
root shell. Download it here:
<a href="https://github.com/notmarek/kindle-usbnetlite" target="_blank" class="link">github.com/notmarek/kindle-usbnetlite</a>
</p>
</div>
<div class="instruction-step">
<h3 class="bebas-neue">Step 3: Connect to Your Kindle via SSH</h3>
<ol style="font-size: 0.875rem;">
<li>Ensure your Kindle is connected to the same local network as your computer</li>
<li>Open USBNetLite on your Kindle</li>
<li>Tap "Toggle USBNetwork" to enable SSH</li>
<li>
On your computer, open a command prompt or terminal and type:
<div class="code-block">ssh root@[kindle-local-ip]</div>
<p style="font-size: 0.75rem; color: #9399b2; margin-top: 0.25rem; margin-left: 1rem;">
Don't know your Kindle's IP? Use
<a href="https://angryip.org/" target="_blank" class="link">Angry IP Scanner</a> to find it.
</p>
</li>
<li>
When prompted for a password, type: <span class="inline-code">kindle</span>, all lowercase
</li>
<li>
You should see a notice about the rootfs being read-only and a prompt like:
<div class="code-block">[root@kindle us]#</div>
</li>
</ol>
</div>
<div class="instruction-step">
<h3 class="bebas-neue">Step 4: Upload Your Custom Images</h3>
<ol style="font-size: 0.875rem;">
<li>
Make the root filesystem writable:
<div class="code-block">mntroot rw</div>
</li>
<li>
Exit the SSH session:
<div class="code-block">exit</div>
</li>
<li>
Navigate to the directory where you saved your custom images:
<div class="code-block">cd /path/to/custom-images</div>
</li>
<li>
Copy all images to your Kindle (this will overwrite the default lock screen images):
<div class="code-block">scp bg_ss*.png root@[kindle-local-ip]:/usr/share/blanket/screensaver</div>
<div style="display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.75rem; color: #cba6f7; margin-top: 0.5rem; margin-left: 1rem;">
<i class="fa fa-book" style="flex-shrink: 0; margin-top: 2px;"></i>
<p>
<strong>For Kids Mode:</strong> Use <span class="inline-code" style="color: #cba6f7; background-color: #11111b;">bg_kids_ss*.png</span> instead.
Kindles in "For Kids" mode use a different set of lock screen images with the "bg_kids_ss" naming convention.
</p>
</div>
</li>
<li>Reboot your Kindle to see the custom images when you lock the screen</li>
</ol>
</div>
<div class="instruction-step">
<h3 class="bebas-neue">Step 5: Configure KOReader (If Applicable)</h3>
<p style="font-size: 0.875rem; line-height: 1.6; margin-bottom: 0.5rem;">
If you use KOReader, you'll need to point its settings to the stock lock images directory,
as KOReader overrides default Kindle locking behavior.
</p>
<ol style="font-size: 0.875rem;">
<li>
Go to <span class="inline-code">Settings → Sleep Screen → Wallpaper</span>
</li>
<li>Set it to "Show random image from folder on sleep screen"</li>
<li>
Go to "Custom images" and enable "Cycle through images in order" (if you want default Kindle behavior)
</li>
<li>
Tap "Choose random image folder" and navigate to:
<div class="code-block">/usr/share/blanket/screensaver</div>
</li>
<li>Set that folder as the random image folder</li>
<li>
Go back to <span class="inline-code">Settings → Sleep Screen → Sleep Screen Message</span>
</li>
<li>Disable "Add custom message to sleep screen"</li>
</ol>
<p style="font-size: 0.875rem; line-height: 1.6; margin-top: 0.5rem; color: #9399b2;">
Now locking within KOReader open should display your custom images exactly as the default Kindle UI would.
</p>
</div>
<!-- Restore Info -->
<div class="alert-box alert-info">
<h3 class="bebas-neue" style="color: #89b4fa; margin-bottom: 0.5rem;">Restoring Original Images</h3>
<p style="font-size: 0.875rem;">
If you want to restore the original lock screen images, you can download them at:
<a href="https://github.com/sykesgabri/kindle-lockscreen-creator/tree/main/stock-lockscreens" target="_blank" class="link" style="font-family: monospace;">https://github.com/sykesgabri/kindle-lockscreen-creator/tree/main/stock-lockscreens</a>
</p>
</div>
</div>
</div>
<!-- Main Grid -->
<div class="grid">
<!-- Left Panel - Controls -->
<div>
<!-- Upload Section -->
<div class="section-card">
<h2 class="bebas-neue section-title" style="color: #89b4fa;">1. Upload Image</h2>
<input type="file" id="file-input" class="file-input" accept="image/*">
<label for="file-input" class="upload-button">Choose Image File</label>
</div>
<!-- Resolution Selection -->
<div class="section-card hidden" id="resolution-section">
<h2 class="bebas-neue section-title" style="color: #89b4fa;">2. Select Kindle Model</h2>
<select id="resolution-select" class="select-input">
<option value="11th-gen-2024">11th Gen Kindle (2024 Release) - (1072×1448)</option>
<option value="1st-gen-scribe">1st Gen Kindle Scribe - (1860×2480)</option>
</select>
<p class="info-text" style="margin-top: 0.5rem;">
Choose your Kindle model for the correct screen resolution
</p>
</div>
<!-- Sizing Method -->
<div class="section-card hidden" id="sizing-section">
<h2 class="bebas-neue section-title" style="color: #89b4fa;">3. Choose Sizing Method</h2>
<div class="radio-option active" data-method="scale-fit">
<input type="radio" name="sizing-method" value="scale-fit" checked>
<div class="radio-label">
<div class="radio-label-title">Scale to Fit</div>
<div class="radio-label-desc">Maintain aspect ratio, add borders if needed</div>
</div>
</div>
<div class="radio-option" data-method="scale-fill">
<input type="radio" name="sizing-method" value="scale-fill">
<div class="radio-label">
<div class="radio-label-title">Scale to Fill</div>
<div class="radio-label-desc">Maintain aspect ratio, crop edges if needed</div>
</div>
</div>
<div class="radio-option" data-method="stretch">
<input type="radio" name="sizing-method" value="stretch">
<div class="radio-label">
<div class="radio-label-title">Stretch</div>
<div class="radio-label-desc">Ignore aspect ratio, fill entire canvas</div>
</div>
</div>
<div class="radio-option" data-method="crop">
<input type="radio" name="sizing-method" value="crop">
<div class="radio-label">
<div class="radio-label-title">Custom Crop</div>
<div class="radio-label-desc">Adjust crop position manually</div>
</div>
</div>
<div class="slider-container" id="crop-sliders">
<div class="slider-group">
<label for="crop-x">Horizontal Position: <span id="crop-x-value">50</span>%</label>
<input type="range" id="crop-x" min="0" max="100" value="50">
</div>
<div class="slider-group">
<label for="crop-y">Vertical Position: <span id="crop-y-value">50</span>%</label>
<input type="range" id="crop-y" min="0" max="100" value="50">
</div>
</div>
</div>
<!-- Level Adjustments Section -->
<div class="section-card hidden" id="levels-section">
<h2 class="bebas-neue section-title" style="color: #89b4fa;">4. Level Adjustments (Optional)</h2>
<div class="alert-box alert-info" style="margin-bottom: 1.5rem;">
<div class="alert-title">
<svg width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
</svg>
<span>Why adjust image levels?</span>
</div>
<p style="margin-bottom: 0;">
Kindle e-ink screens have limited contrast and may display some images as too dark, washed out, or lacking detail.
Use these adjustments to fine-tune the brightness and contrast of your image for optimal display on your Kindle screen.
Some images work well without adjustments, but darker photos or low-contrast images may benefit from tweaking these settings.
</p>
</div>
<div class="checkbox-option" style="margin-bottom: 1.5rem;">
<input type="checkbox" id="enable-levels">
<div class="radio-label">
<div class="radio-label-title">Enable Level Adjustments</div>
<div class="radio-label-desc">Adjust black point, white point, and midtones</div>
</div>
</div>
<div class="slider-container" id="level-sliders">
<div class="slider-group">
<label for="black-point">Black Point: <span id="black-point-value">0</span></label>
<input type="range" id="black-point" min="0" max="100" value="0" disabled>
<div class="slider-hint">Darken shadows →</div>
</div>
<div class="slider-group">
<label for="white-point">White Point: <span id="white-point-value">255</span></label>
<input type="range" id="white-point" min="155" max="255" value="255" disabled>
<div class="slider-hint">← Lighten highlights</div>
</div>
<div class="slider-group">
<label for="gamma">Midtones: <span id="gamma-value">1.0</span></label>
<input type="range" id="gamma" min="50" max="200" value="100" disabled>
<div class="slider-hint">← Darken | Brighten →</div>
</div>
</div>
</div>
<!-- File Number -->
<div class="section-card hidden" id="file-number-section">
<h2 class="bebas-neue section-title" style="color: #89b4fa;">5. Set File Number</h2>
<div class="checkbox-option">
<input type="checkbox" id="kids-mode">
<div class="radio-label">
<div class="radio-label-title">Kids Mode</div>
<div class="radio-label-desc">Enable this if your Kindle is set to "For Kids" mode</div>
</div>
</div>
<div class="filename-input-group">
<span id="filename-prefix">bg_ss</span>
<input type="text" id="file-number" maxlength="2" placeholder="XX" value="00">
<span>.png</span>
</div>
<p class="info-text">Enter a two-digit number (00-99)</p>
<div class="info-icon-text warning">
<i class="fa fa-info-circle"></i>
<p>Numbers 00-19 are tested and confirmed working (this is the range the stock set of images uses). Numbers beyond 19 should work but haven't yet been tested.</p>
</div>
<div class="info-icon-text purple hidden" id="kids-mode-note">
<i class="fa fa-book"></i>
<p>Kids Mode uses a different set of lock screen images with the "bg_kids_ss" prefix</p>
</div>
</div>
<!-- Download Button -->
<button class="download-button hidden" id="download-button">Download</button>
</div>
<!-- Right Panel - Preview -->
<div class="preview-panel">
<div class="section-card">
<h2 class="bebas-neue section-title" style="color: #cba6f7;">Preview</h2>
<div id="preview-placeholder" class="preview-placeholder">
<p>Upload an image to see preview</p>
</div>
<div id="preview-output" class="hidden">
<p class="info-text" style="margin-bottom: 0.5rem;" id="preview-dimensions">Final Output (1072×1448, Greyscale)</p>
<div class="preview-container">
<canvas id="preview-canvas" class="preview-canvas"></canvas>
</div>
<div class="preview-info" style="margin-top: 1rem;">
<p>• Format: 8-bit Greyscale PNG</p>
<p id="preview-info-dimensions">• Dimensions: 1072 × 1448 pixels</p>
<p id="preview-info-model">• Model: 11th Gen Kindle (2024 Release)</p>
</div>
</div>
</div>
</div>
</div>
<!-- Hidden Processing Canvas -->
<canvas id="processing-canvas" style="display: none;"></canvas>
<!-- Contributor Section -->
<div class="section-card contributor-section">
<div class="contributor-header">
<i class="fa fa-info-circle" style="color: #cba6f7; font-size: 28px;"></i>
<div>
<h2 class="bebas-neue section-title" style="color: #cba6f7; margin-bottom: 0.5rem;">About This Tool</h2>
<div class="contributor-content">
<p>
Full disclosure: This app was <strong>vibe-coded</strong> (I suck at JS so I made an AI write it for me) and so far has only been tested on an
11th Gen Kindle (2024 Release), as that's what I have. While it should work for the 1st Gen Kindle Scribe based on documented specifications,
this hasn't yet been verified.<br>
<br>
I have still gone over the code and manually tweaked phrasing, and ensured that all instructions are accurate to the best of my ability.
</p>
<p>
<strong>Special thanks to:</strong>
<br>
<ul>
<li>
<a href="https://jcs.org/2025/02/24/kindle" target="_blank" class="link">Joshua Stein</a>
for the invaluable resource that helped determine where default lock screen images are stored,
the correct export settings and naming conventions, and the 1st Gen Kindle Scribe's resolution.
</li>
<br>
<li>
<a href="https://kindlemodding.org" target="_blank" class="link">The Kindle modding community</a>
for making this possible in the first place, and allowing people to free the hardware they own
from Jeff Bezos' clutches.
</li>
<br>
<li>
<a href="https://github.com/notmarek" target="_blank" class="link">Marek Veselý</a> for creating
USBNetLite for Kindle, among many other great contributions to the Kindle modding community.
</li>
<br>
<li>
<a href="https://github.com/angryip/ipscan" target="_blank" class="link">The Angry IP Scanner devs</a>
for creating a tool that makes it easy to find out the local IP addresses of devices on your network.
</li>
<br>
<li>
<a href="https://github.com/koreader/koreader" target="_blank" class="link">The KOReader devs</a>
for creating an incredibly feature-rich E-book reader that's compatible with pretty much everything,
and a must-have for jailbroken Kindles.
</li>
<br>
<li>
<a href="https://github.com/sykesgabri/kindle-lockscreen-creator" target="_blank" class="link">All contributors to this tool</a> for
helping improve the codebase and adding support for other models of Kindle.
</li>
</ul>
</p>
</div>
</div>
</div>
<div class="alert-box alert-info" style="margin-bottom: 0;">
<div class="alert-title" style="margin-bottom: 0.5rem;">
<i class="fa fa-users"></i>
<h3 class="bebas-neue" style="font-size: 1.25rem;">Contributions Welcome!</h3>
</div>
<div style="font-size: 0.875rem;">
<p>This project needs your help! If you have access to other Kindle models, please contribute by:</p>
<ul style="margin-left: 1.5rem; margin-top: 0.5rem; margin-bottom: 0.5rem;">
<li>Testing these generated images on your Kindle model</li>
<li>Submitting resolution and image specifications for your model</li>
<li>Sharing the default lock screen images from your Kindle</li>
<li>Reporting any issues or bugs you encounter</li>
<li>Suggesting improvements or new features</li>
</ul>
<p style="margin-top: 0.75rem;">
Submit pull requests and issues at:
<a href="https://github.com/sykesgabri/kindle-lockscreen-creator" target="_blank" class="link" style="font-family: monospace;">https://github.com/sykesgabri/kindle-lockscreen-creator</a>
</p>
<p style="font-size: 0.75rem; font-style: italic; margin-top: 0.5rem; color: #74c7ec;">
Your contributions help make this tool compatible with more Kindle models.
</p>
</div>
</div>
</div>
</div>
<script>
// State variables
let uploadedImage = null;
let sizingMethod = 'scale-fit';
let resolution = '11th-gen-2024';
let kidsMode = false;
let cropPosition = { x: 50, y: 50 };
let processedImageData = null;
let levelsEnabled = false;
let levelAdjustments = { blackPoint: 0, whitePoint: 255, gamma: 1.0 };
const RESOLUTIONS = {
'11th-gen-2024': { width: 1072, height: 1448, name: '11th Gen Kindle (2024 Release)' },
'1st-gen-scribe': { width: 1860, height: 2480, name: '1st Gen Kindle Scribe' }
};
// DOM Elements
const fileInput = document.getElementById('file-input');
const resolutionSection = document.getElementById('resolution-section');
const sizingSection = document.getElementById('sizing-section');
const fileNumberSection = document.getElementById('file-number-section');
const downloadButton = document.getElementById('download-button');
const resolutionSelect = document.getElementById('resolution-select');
const fileNumberInput = document.getElementById('file-number');
const kidsModeCheckbox = document.getElementById('kids-mode');
const filenamePrefix = document.getElementById('filename-prefix');
const kidsModeNote = document.getElementById('kids-mode-note');
const cropSliders = document.getElementById('crop-sliders');
const cropXSlider = document.getElementById('crop-x');
const cropYSlider = document.getElementById('crop-y');
const cropXValue = document.getElementById('crop-x-value');
const cropYValue = document.getElementById('crop-y-value');
const previewPlaceholder = document.getElementById('preview-placeholder');
const previewOutput = document.getElementById('preview-output');
const previewCanvas = document.getElementById('preview-canvas');
const processingCanvas = document.getElementById('processing-canvas');
const previewDimensions = document.getElementById('preview-dimensions');
const previewInfoDimensions = document.getElementById('preview-info-dimensions');
const previewInfoModel = document.getElementById('preview-info-model');
const instructionsToggle = document.getElementById('instructions-toggle');
const instructionsContent = document.getElementById('instructions-content');
const instructionsIcon = document.getElementById('instructions-icon');
const levelsSection = document.getElementById('levels-section');
const enableLevelsCheckbox = document.getElementById('enable-levels');
const levelSliders = document.getElementById('level-sliders');
const blackPointSlider = document.getElementById('black-point');
const whitePointSlider = document.getElementById('white-point');
const gammaSlider = document.getElementById('gamma');
const blackPointValue = document.getElementById('black-point-value');
const whitePointValue = document.getElementById('white-point-value');
const gammaValue = document.getElementById('gamma-value');
// Instructions collapsible
instructionsToggle.addEventListener('click', () => {
const isActive = instructionsContent.classList.contains('active');
instructionsContent.classList.toggle('active');
instructionsToggle.classList.toggle('active');
// Update icon
if (isActive) {
instructionsIcon.className = 'fa fa-chevron-down';
} else {