Compare commits

...

6 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
48fab36903 Revert changes to .gitignore
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-12-23 13:01:10 +00:00
copilot-swe-agent[bot]
b68a9e00b5 Address PR feedback: use gammaCorrectVal and remove CodeQL file
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-12-23 12:13:09 +00:00
copilot-swe-agent[bot]
101eef5db4 Complete fix for gamma correction initialization
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-12-23 10:30:21 +00:00
copilot-swe-agent[bot]
cba0e4fa1d Fix gamma correction not enabled on fresh install
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
2025-12-23 10:29:20 +00:00
copilot-swe-agent[bot]
81e35ec933 Initial plan 2025-12-23 10:22:45 +00:00
Damian Schneider
b821e20fd6 use constant instead of magic number in pixelforge 2025-12-22 20:06:20 +01:00
2 changed files with 6 additions and 4 deletions

View File

@@ -506,8 +506,8 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
CJSON(strip.autoSegments, light[F("aseg")]);
CJSON(gammaCorrectVal, light["gc"]["val"]); // default 2.2
float light_gc_bri = light["gc"]["bri"];
float light_gc_col = light["gc"]["col"];
float light_gc_bri = light["gc"]["bri"] | 1.0f; // default to 1.0 (false)
float light_gc_col = light["gc"]["col"] | gammaCorrectVal; // default to gammaCorrectVal (true)
if (light_gc_bri > 1.0f) gammaCorrectBri = true;
else gammaCorrectBri = false;
if (light_gc_col > 1.0f) gammaCorrectCol = true;

View File

@@ -416,6 +416,8 @@ button, .btn {
<script>
const d=document,gId=i=>d.getElementById(i),cE=t=>d.createElement(t);
const imgageFX = 53; // image effect number
const txtFX = 122; // scrolling text effect number
/* canvases */
const cv=gId('cv'),cx=cv.getContext('2d',{willReadFrequently:true});
@@ -467,7 +469,7 @@ function segLoad(){
if(j.seg&&j.seg.length){
j.seg.forEach(({id,n,start,stop,startY,stopY,fx})=>{
const w=stop-start,h=(stopY-startY)||1;
const t = (n || `Segment ${id}`) + (h>1 ? ` (${w}x${h})` : ` (${w}px)`) + (fx===53 ? ' [Image]' : (fx===122 ? ' [Scrolling Text]' : ''));
const t = (n || `Segment ${id}`) + (h>1 ? ` (${w}x${h})` : ` (${w}px)`) + (fx===imgageFX ? ' [Image]' : (fx===txtFX ? ' [Scrolling Text]' : ''));
const o=new Option(t,id);
o.dataset.w=w; o.dataset.h=h; o.dataset.fx=fx||0;
s1.add(o); // gif tool
@@ -488,7 +490,7 @@ function segLoad(){
function curImgSeg(){
const sel=gId('seg');
for(let i=0;i<sel.options.length;i++){
if(parseInt(sel.options[i].dataset.fx)===53) return parseInt(sel.options[i].value);
if(parseInt(sel.options[i].dataset.fx)===imgageFX) return parseInt(sel.options[i].value);
}
return null;
}