Skip to content

Commit

Permalink
New: Adjust the brightness, saturation, contrast, sepia and colorize …
Browse files Browse the repository at this point in the history
…black and white images
ollm committed Oct 2, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
miri64 Martine Lenders
1 parent c41ecde commit 04b1caa
Showing 45 changed files with 3,859 additions and 756 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -14,7 +14,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- 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)
- Improve the detection of the type of compressed files if the file extension is not correct [`b39605c`](https://github.com/ollm/OpenComic/commit/b39605c5d5ab72742cf32f14a23004976cccec7c)
- Option to start OpenComic in startup (Windows and macOS only) [`7b9b8ec`](https://github.com/ollm/OpenComic/commit/7b9b8ec4457445ad9bb3a761face8403ff507b7f)
- Buttons in library to go next and prev chapter
- Buttons in library to go next and prev chapter [`c41ecde`](https://github.com/ollm/OpenComic/commit/c41ecde33a3b0b2361b9ccdcbec92d848b48077d)
- Adjust the brightness, saturation, contrast, sepia and colorize black and white images

##### 🐛 Bug Fixes

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -36,6 +36,8 @@
- 🔖 Bookmarks and continue reading
- 🔍 Floating magnifying glass
- 🖱 Reading in scroll or slide
- ⚪ Adjust the brightness, saturation, contrast, sepia and invert colors
- 🎨 Colorize black and white images
- 🎮 Gamepad navigation

You can see the changes between versions in the [Changelog 📝](https://github.com/ollm/OpenComic/blob/master/CHANGELOG.md)
26 changes: 23 additions & 3 deletions languages/ca.json
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@
"contextMenu": {
"remove": "Retirar",
"openFileLocation": "Obre la ubicació del fitxer",
"openFolderLocation": "Obre la ubicació de la carpeta",
"addPoster": "Afegeix pòster",
"changePoster": "Canviar el pòster",
"deletePoster": "Esborrar pòster",
@@ -57,7 +58,8 @@
"nextChapter": "Següent capítol",
"pages": {
"main": "Pàgines",
"pageLayout": "Maquetació de les pàgines",
"pageLayout": "Disseny de pàgina",
"colorFilters": "Filtres de color",
"slide": "Lectura horitzontal",
"scroll": "Lectura vertical",
"adjustToWidth": "Ajustar a l'ample",
@@ -75,7 +77,22 @@
"readingGlobal": "Configuració global",
"readingConfigNew": "Nova configuració",
"clipHorizontal": "Retallar horitzontalment",
"clipVertical": "Retallar verticalment"
"clipVertical": "Retallar verticalment",
"colors": "Colors",
"brightness": "Lluminositat",
"saturation": "Saturació",
"contrast": "Contrast",
"sepia": "Sèpia",
"invert": "Invertir",
"hueRotate": "Rotació de tonalitat",
"tone": "To",
"colorize": "Coloritzar",
"onlyBlackAndWhite": "Només en imatges en blanc i negre",
"colorPreset": "Preajust de color",
"multiplier": "Mult.",
"saveAsPreset": "Guardar com a preajustament",
"addColor": "Afegeix color",
"fromImage": "Color des d'una imatge"
},
"magnifyingGlass": {
"main": "Lupa",
@@ -201,7 +218,9 @@
"readingConfigEditHeader": "Editar configuració",
"readingConfigName": "Nom de la configuració",
"readingConfigRemoveHeader": "Eliminar la configuració",
"readingConfigRemove": "Esteu segur que voleu eliminar aquesta configuració?"
"readingConfigRemove": "Esteu segur que voleu eliminar aquesta configuració?",
"readingNumColorsGenerate": "Número de colors a generar",
"readingPresetName": "Nom del preajustament"
},
"release": {
"title": "Nova versió disponible <b>{{releaseName}}</b>",
@@ -211,6 +230,7 @@
"buttons": {
"cancel": "Cancel·lar",
"ok": "Ok",
"save": "Guardar",
"undo": "Desfer",
"dismiss": "Descarta",
"remove": "Eliminar",
26 changes: 24 additions & 2 deletions languages/en.json
Original file line number Diff line number Diff line change
@@ -58,6 +58,7 @@
"pages": {
"main": "Pages",
"pageLayout": "Page layout",
"colorFilters": "Color filters",
"slide": "Slide Reader",
"scroll": "Vertical Reader",
"adjustToWidth": "Adjust to width",
@@ -75,7 +76,25 @@
"readingGlobal": "Global configuration",
"readingConfigNew": "New configuration",
"clipHorizontal": "Clip horizontal",
"clipVertical": "Clip vertical"
"clipVertical": "Clip vertical",
"colors": "Colors",
"brightness": "Brightness",
"saturation": "Saturation",
"contrast": "Contrast",
"sepia": "Sepia",
"invert": "Invert",
"hueRotate": "Hue rotate",
"tone": "Tone",
"colorize": "Colorize",
"onlyBlackAndWhite": "Only in black and white images",
"colorPreset": "Color preset",
"multiplier": "Mult.",
"saveAsPreset": "Save as preset",
"addColor": "Add color",
"fromImage": "Color from an image",
"savedPresets": "Saved presets",
"multipleTonePresets": "Multiple tone presets",
"oneTonePresets": "One tone presets"
},
"magnifyingGlass": {
"main": "Magnifying glass",
@@ -201,7 +220,9 @@
"readingConfigEditHeader": "Edit configuration",
"readingConfigName": "Configuration name",
"readingConfigRemoveHeader": "Remove configuration",
"readingConfigRemove": "Are you sure you want to remove this configuration?"
"readingConfigRemove": "Are you sure you want to remove this configuration?",
"readingNumColorsGenerate": "Number of colors to generate",
"readingPresetName": "Preset name"
},
"release": {
"title": "New version available <b>{{releaseName}}</b>",
@@ -211,6 +232,7 @@
"buttons": {
"cancel": "Cancel",
"ok": "Ok",
"save": "Save",
"undo": "Undo",
"dismiss": "Dismiss",
"remove": "Remove",
28 changes: 24 additions & 4 deletions languages/es.json
Original file line number Diff line number Diff line change
@@ -23,7 +23,8 @@
},
"contextMenu": {
"remove": "Retirar",
"openFileLocation": "Abrir localización de archivo",
"openFileLocation": "Abrir ubicación del archivo",
"openFolderLocation": "Abrir ubicación de la carpeta",
"addPoster": "Añadir póster",
"changePoster": "Cambiar póster",
"deletePoster": "Eliminar póster",
@@ -57,7 +58,8 @@
"nextChapter": "Siguiente capítulo",
"pages": {
"main": "Páginas",
"pageLayout": "Maquetación de las páginas",
"pageLayout": "Diseño de página",
"colorFilters": "Filtros de color",
"slide": "Lectura horizontal",
"scroll": "Lectura vertical",
"adjustToWidth": "Ajustar a lo ancho",
@@ -75,7 +77,22 @@
"readingGlobal": "Configuración global",
"readingConfigNew": "Nueva configuración",
"clipHorizontal": "Recortar horizontalmente",
"clipVertical": "Recortar verticalmente"
"clipVertical": "Recortar verticalmente",
"colors": "Colores",
"brightness": "Brillo",
"saturation": "Saturación",
"contrast": "Contraste",
"sepia": "Sepia",
"invert": "Invertir",
"hueRotate": "Rotación de tono",
"tone": "Tono",
"colorize": "Colorear",
"onlyBlackAndWhite": "Sólo en imágenes en blanco y negro",
"colorPreset": "Preajuste de color",
"multiplier": "Mult.",
"saveAsPreset": "Guardar como preajuste",
"addColor": "Añadir color",
"fromImage": "Color desde una imagen"
},
"magnifyingGlass": {
"main": "Lupa",
@@ -201,7 +218,9 @@
"readingConfigEditHeader": "Editar configuración",
"readingConfigName": "Nombre de la configuración",
"readingConfigRemoveHeader": "Eliminar configuración",
"readingConfigRemove": "¿Seguro que quiere eliminar esta configuración?"
"readingConfigRemove": "¿Seguro que quiere eliminar esta configuración?",
"readingNumColorsGenerate": "Número de colores a generar",
"readingPresetName": "Nombre del preajuste"
},
"release": {
"title": "Nueva versión disponible <b>{{releaseName}}</b>",
@@ -211,6 +230,7 @@
"buttons": {
"cancel": "Cancelar",
"ok": "Ok",
"save": "Guardar",
"undo": "Deshacer",
"dismiss": "Descartar",
"remove": "Eliminar",
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@
},
"devDependencies": {
"@electron/rebuild": "^3.2.13",
"electron": "^27.0.0-beta.2",
"electron": "^27.0.0-beta.8",
"electron-builder": "^24.6.3",
"node-abi": "^3.46.0",
"nodemon": "^3.0.1"
52 changes: 52 additions & 0 deletions scripts/app.js
Original file line number Diff line number Diff line change
@@ -110,6 +110,52 @@ function invertedDPR(number) {

}

function pageY(e) {

return e.touches ? e.touches[0].pageY : e.pageY;

}

function pageX(e) {

return e.touches ? e.touches[0].pageX : e.pageX;

}

function clientY(e) {

if(e.touches && e.touches[0].clientY !== undefined)
return e.touches[0].clientY;
else if(e.clientY !== undefined)
return e.clientY;

return pageY(e);

}

function clientX(e) {

if(e.touches && e.touches[0].clientX !== undefined)
return e.touches[0].clientX;
else if(e.clientX !== undefined)
return e.clientX;

return pageX(e);

}

function rand(min = 0, max = 10000000)
{
return Math.floor(Math.random() * (max - min + 1)) + min;
}

function sleep(ms)
{
return new Promise(function(resolve){
setTimeout(resolve, ms)
});
}

module.exports = {
event: event,
eventOff: eventOff,
@@ -119,4 +165,10 @@ module.exports = {
roundDPR: roundDPR,
floorDPR: floorDPR,
invertedDPR: invertedDPR,
pageY: pageY,
pageX: pageX,
clientY: clientY,
clientX: clientX,
rand: rand,
sleep: sleep,
};
2 changes: 1 addition & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ for(let i = 0, len = themes.length; i < len; i++)
}
}

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

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

0 comments on commit 04b1caa

Please sign in to comment.