Skip to content

Commit 04b1caa

Browse files
committed
New: Adjust the brightness, saturation, contrast, sepia and colorize black and white images
1 parent c41ecde commit 04b1caa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3859
-756
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1414
- Show in first/last page buttons if has next/prev comic and go to next/prev comics scrolling [`2a3796e`](https://github.com/ollm/OpenComic/commit/2a3796eb82cdc86c70c69cae62e48da9baf41aa0)
1515
- Improve the detection of the type of compressed files if the file extension is not correct [`b39605c`](https://github.com/ollm/OpenComic/commit/b39605c5d5ab72742cf32f14a23004976cccec7c)
1616
- Option to start OpenComic in startup (Windows and macOS only) [`7b9b8ec`](https://github.com/ollm/OpenComic/commit/7b9b8ec4457445ad9bb3a761face8403ff507b7f)
17-
- Buttons in library to go next and prev chapter
17+
- Buttons in library to go next and prev chapter [`c41ecde`](https://github.com/ollm/OpenComic/commit/c41ecde33a3b0b2361b9ccdcbec92d848b48077d)
18+
- Adjust the brightness, saturation, contrast, sepia and colorize black and white images
1819

1920
##### 🐛 Bug Fixes
2021

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
- 🔖 Bookmarks and continue reading
3737
- 🔍 Floating magnifying glass
3838
- 🖱 Reading in scroll or slide
39+
- ⚪ Adjust the brightness, saturation, contrast, sepia and invert colors
40+
- 🎨 Colorize black and white images
3941
- 🎮 Gamepad navigation
4042

4143
You can see the changes between versions in the [Changelog 📝](https://github.com/ollm/OpenComic/blob/master/CHANGELOG.md)

languages/ca.json

+23-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"contextMenu": {
2525
"remove": "Retirar",
2626
"openFileLocation": "Obre la ubicació del fitxer",
27+
"openFolderLocation": "Obre la ubicació de la carpeta",
2728
"addPoster": "Afegeix pòster",
2829
"changePoster": "Canviar el pòster",
2930
"deletePoster": "Esborrar pòster",
@@ -57,7 +58,8 @@
5758
"nextChapter": "Següent capítol",
5859
"pages": {
5960
"main": "Pàgines",
60-
"pageLayout": "Maquetació de les pàgines",
61+
"pageLayout": "Disseny de pàgina",
62+
"colorFilters": "Filtres de color",
6163
"slide": "Lectura horitzontal",
6264
"scroll": "Lectura vertical",
6365
"adjustToWidth": "Ajustar a l'ample",
@@ -75,7 +77,22 @@
7577
"readingGlobal": "Configuració global",
7678
"readingConfigNew": "Nova configuració",
7779
"clipHorizontal": "Retallar horitzontalment",
78-
"clipVertical": "Retallar verticalment"
80+
"clipVertical": "Retallar verticalment",
81+
"colors": "Colors",
82+
"brightness": "Lluminositat",
83+
"saturation": "Saturació",
84+
"contrast": "Contrast",
85+
"sepia": "Sèpia",
86+
"invert": "Invertir",
87+
"hueRotate": "Rotació de tonalitat",
88+
"tone": "To",
89+
"colorize": "Coloritzar",
90+
"onlyBlackAndWhite": "Només en imatges en blanc i negre",
91+
"colorPreset": "Preajust de color",
92+
"multiplier": "Mult.",
93+
"saveAsPreset": "Guardar com a preajustament",
94+
"addColor": "Afegeix color",
95+
"fromImage": "Color des d'una imatge"
7996
},
8097
"magnifyingGlass": {
8198
"main": "Lupa",
@@ -201,7 +218,9 @@
201218
"readingConfigEditHeader": "Editar configuració",
202219
"readingConfigName": "Nom de la configuració",
203220
"readingConfigRemoveHeader": "Eliminar la configuració",
204-
"readingConfigRemove": "Esteu segur que voleu eliminar aquesta configuració?"
221+
"readingConfigRemove": "Esteu segur que voleu eliminar aquesta configuració?",
222+
"readingNumColorsGenerate": "Número de colors a generar",
223+
"readingPresetName": "Nom del preajustament"
205224
},
206225
"release": {
207226
"title": "Nova versió disponible <b>{{releaseName}}</b>",
@@ -211,6 +230,7 @@
211230
"buttons": {
212231
"cancel": "Cancel·lar",
213232
"ok": "Ok",
233+
"save": "Guardar",
214234
"undo": "Desfer",
215235
"dismiss": "Descarta",
216236
"remove": "Eliminar",

languages/en.json

+24-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"pages": {
5959
"main": "Pages",
6060
"pageLayout": "Page layout",
61+
"colorFilters": "Color filters",
6162
"slide": "Slide Reader",
6263
"scroll": "Vertical Reader",
6364
"adjustToWidth": "Adjust to width",
@@ -75,7 +76,25 @@
7576
"readingGlobal": "Global configuration",
7677
"readingConfigNew": "New configuration",
7778
"clipHorizontal": "Clip horizontal",
78-
"clipVertical": "Clip vertical"
79+
"clipVertical": "Clip vertical",
80+
"colors": "Colors",
81+
"brightness": "Brightness",
82+
"saturation": "Saturation",
83+
"contrast": "Contrast",
84+
"sepia": "Sepia",
85+
"invert": "Invert",
86+
"hueRotate": "Hue rotate",
87+
"tone": "Tone",
88+
"colorize": "Colorize",
89+
"onlyBlackAndWhite": "Only in black and white images",
90+
"colorPreset": "Color preset",
91+
"multiplier": "Mult.",
92+
"saveAsPreset": "Save as preset",
93+
"addColor": "Add color",
94+
"fromImage": "Color from an image",
95+
"savedPresets": "Saved presets",
96+
"multipleTonePresets": "Multiple tone presets",
97+
"oneTonePresets": "One tone presets"
7998
},
8099
"magnifyingGlass": {
81100
"main": "Magnifying glass",
@@ -201,7 +220,9 @@
201220
"readingConfigEditHeader": "Edit configuration",
202221
"readingConfigName": "Configuration name",
203222
"readingConfigRemoveHeader": "Remove configuration",
204-
"readingConfigRemove": "Are you sure you want to remove this configuration?"
223+
"readingConfigRemove": "Are you sure you want to remove this configuration?",
224+
"readingNumColorsGenerate": "Number of colors to generate",
225+
"readingPresetName": "Preset name"
205226
},
206227
"release": {
207228
"title": "New version available <b>{{releaseName}}</b>",
@@ -211,6 +232,7 @@
211232
"buttons": {
212233
"cancel": "Cancel",
213234
"ok": "Ok",
235+
"save": "Save",
214236
"undo": "Undo",
215237
"dismiss": "Dismiss",
216238
"remove": "Remove",

languages/es.json

+24-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
},
2424
"contextMenu": {
2525
"remove": "Retirar",
26-
"openFileLocation": "Abrir localización de archivo",
26+
"openFileLocation": "Abrir ubicación del archivo",
27+
"openFolderLocation": "Abrir ubicación de la carpeta",
2728
"addPoster": "Añadir póster",
2829
"changePoster": "Cambiar póster",
2930
"deletePoster": "Eliminar póster",
@@ -57,7 +58,8 @@
5758
"nextChapter": "Siguiente capítulo",
5859
"pages": {
5960
"main": "Páginas",
60-
"pageLayout": "Maquetación de las páginas",
61+
"pageLayout": "Diseño de página",
62+
"colorFilters": "Filtros de color",
6163
"slide": "Lectura horizontal",
6264
"scroll": "Lectura vertical",
6365
"adjustToWidth": "Ajustar a lo ancho",
@@ -75,7 +77,22 @@
7577
"readingGlobal": "Configuración global",
7678
"readingConfigNew": "Nueva configuración",
7779
"clipHorizontal": "Recortar horizontalmente",
78-
"clipVertical": "Recortar verticalmente"
80+
"clipVertical": "Recortar verticalmente",
81+
"colors": "Colores",
82+
"brightness": "Brillo",
83+
"saturation": "Saturación",
84+
"contrast": "Contraste",
85+
"sepia": "Sepia",
86+
"invert": "Invertir",
87+
"hueRotate": "Rotación de tono",
88+
"tone": "Tono",
89+
"colorize": "Colorear",
90+
"onlyBlackAndWhite": "Sólo en imágenes en blanco y negro",
91+
"colorPreset": "Preajuste de color",
92+
"multiplier": "Mult.",
93+
"saveAsPreset": "Guardar como preajuste",
94+
"addColor": "Añadir color",
95+
"fromImage": "Color desde una imagen"
7996
},
8097
"magnifyingGlass": {
8198
"main": "Lupa",
@@ -201,7 +218,9 @@
201218
"readingConfigEditHeader": "Editar configuración",
202219
"readingConfigName": "Nombre de la configuración",
203220
"readingConfigRemoveHeader": "Eliminar configuración",
204-
"readingConfigRemove": "¿Seguro que quiere eliminar esta configuración?"
221+
"readingConfigRemove": "¿Seguro que quiere eliminar esta configuración?",
222+
"readingNumColorsGenerate": "Número de colores a generar",
223+
"readingPresetName": "Nombre del preajuste"
205224
},
206225
"release": {
207226
"title": "Nueva versión disponible <b>{{releaseName}}</b>",
@@ -211,6 +230,7 @@
211230
"buttons": {
212231
"cancel": "Cancelar",
213232
"ok": "Ok",
233+
"save": "Guardar",
214234
"undo": "Deshacer",
215235
"dismiss": "Descartar",
216236
"remove": "Eliminar",

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
},
8484
"devDependencies": {
8585
"@electron/rebuild": "^3.2.13",
86-
"electron": "^27.0.0-beta.2",
86+
"electron": "^27.0.0-beta.8",
8787
"electron-builder": "^24.6.3",
8888
"node-abi": "^3.46.0",
8989
"nodemon": "^3.0.1"

scripts/app.js

+52
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,52 @@ function invertedDPR(number) {
110110

111111
}
112112

113+
function pageY(e) {
114+
115+
return e.touches ? e.touches[0].pageY : e.pageY;
116+
117+
}
118+
119+
function pageX(e) {
120+
121+
return e.touches ? e.touches[0].pageX : e.pageX;
122+
123+
}
124+
125+
function clientY(e) {
126+
127+
if(e.touches && e.touches[0].clientY !== undefined)
128+
return e.touches[0].clientY;
129+
else if(e.clientY !== undefined)
130+
return e.clientY;
131+
132+
return pageY(e);
133+
134+
}
135+
136+
function clientX(e) {
137+
138+
if(e.touches && e.touches[0].clientX !== undefined)
139+
return e.touches[0].clientX;
140+
else if(e.clientX !== undefined)
141+
return e.clientX;
142+
143+
return pageX(e);
144+
145+
}
146+
147+
function rand(min = 0, max = 10000000)
148+
{
149+
return Math.floor(Math.random() * (max - min + 1)) + min;
150+
}
151+
152+
function sleep(ms)
153+
{
154+
return new Promise(function(resolve){
155+
setTimeout(resolve, ms)
156+
});
157+
}
158+
113159
module.exports = {
114160
event: event,
115161
eventOff: eventOff,
@@ -119,4 +165,10 @@ module.exports = {
119165
roundDPR: roundDPR,
120166
floorDPR: floorDPR,
121167
invertedDPR: invertedDPR,
168+
pageY: pageY,
169+
pageX: pageX,
170+
clientY: clientY,
171+
clientX: clientX,
172+
rand: rand,
173+
sleep: sleep,
122174
};

scripts/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ for(let i = 0, len = themes.length; i < len; i++)
4141
}
4242
}
4343

44-
templatesJs += 'module.exports = {templatesCacheTheme: templatesCacheTheme, templatesCache: templatesCache};';
44+
templatesJs += 'hb.partials = hb.templates = templatesCache; module.exports = {templatesCacheTheme: templatesCacheTheme, templatesCache: templatesCache};';
4545

4646
if(!fs.existsSync(p.join(__dirname, '../scripts/builded/')))
4747
fs.mkdirSync(p.join(__dirname, '../scripts/builded/'));

0 commit comments

Comments
 (0)