fix: misc

This commit is contained in:
Ibrahima G. Coulibaly
2024-06-27 13:31:08 +01:00
parent a26d2b9d65
commit 464ca3e3d3
3 changed files with 20 additions and 24 deletions

34
.idea/workspace.xml generated
View File

@@ -4,12 +4,10 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="feat: change gif speed"> <list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="chore: remove unused deps">
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/pages/home/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/home/index.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/video/gif/change-speed/change-speed.service.test.ts" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/src/pages/video/gif/change-speed/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/video/gif/change-speed/index.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/video/gif/change-speed/meta.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/video/gif/change-speed/meta.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/video/gif/change-speed/service.ts" beforeDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -202,15 +200,7 @@
<workItem from="1719363272227" duration="390000" /> <workItem from="1719363272227" duration="390000" />
<workItem from="1719379971872" duration="8943000" /> <workItem from="1719379971872" duration="8943000" />
<workItem from="1719464673797" duration="38000" /> <workItem from="1719464673797" duration="38000" />
<workItem from="1719475764139" duration="12743000" /> <workItem from="1719475764139" duration="14630000" />
</task>
<task id="LOCAL-00021" summary="chore: idea config">
<option name="closed" value="true" />
<created>1719024346455</created>
<option name="number" value="00021" />
<option name="presentableId" value="LOCAL-00021" />
<option name="project" value="LOCAL" />
<updated>1719024346455</updated>
</task> </task>
<task id="LOCAL-00022" summary="feat: react helmet"> <task id="LOCAL-00022" summary="feat: react helmet">
<option name="closed" value="true" /> <option name="closed" value="true" />
@@ -596,7 +586,15 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1719488380275</updated> <updated>1719488380275</updated>
</task> </task>
<option name="localTasksCounter" value="70" /> <task id="LOCAL-00070" summary="chore: remove unused deps">
<option name="closed" value="true" />
<created>1719488576835</created>
<option name="number" value="00070" />
<option name="presentableId" value="LOCAL-00070" />
<option name="project" value="LOCAL" />
<updated>1719488576835</updated>
</task>
<option name="localTasksCounter" value="71" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@@ -617,7 +615,6 @@
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" /> <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_NEW_TODO" value="false" /> <option name="CHECK_NEW_TODO" value="false" />
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="fix: create-tool.mjs" />
<MESSAGE value="feat: change colors in png init" /> <MESSAGE value="feat: change colors in png init" />
<MESSAGE value="feat: change colors in png" /> <MESSAGE value="feat: change colors in png" />
<MESSAGE value="chore: ResultFooter" /> <MESSAGE value="chore: ResultFooter" />
@@ -642,7 +639,8 @@
<MESSAGE value="feat: playwright" /> <MESSAGE value="feat: playwright" />
<MESSAGE value="refactor: optimize imports" /> <MESSAGE value="refactor: optimize imports" />
<MESSAGE value="feat: change gif speed" /> <MESSAGE value="feat: change gif speed" />
<option name="LAST_COMMIT_MESSAGE" value="feat: change gif speed" /> <MESSAGE value="chore: remove unused deps" />
<option name="LAST_COMMIT_MESSAGE" value="chore: remove unused deps" />
</component> </component>
<component name="XSLT-Support.FileAssociations.UIState"> <component name="XSLT-Support.FileAssociations.UIState">
<expand /> <expand />

View File

@@ -22,7 +22,7 @@ export default function Home() {
<Grid width={'80%'} container mt={2} spacing={2}> <Grid width={'80%'} container mt={2} spacing={2}>
{getToolsByCategory().map((category) => ( {getToolsByCategory().map((category) => (
<Grid key={category.type} item xs={12} md={6}> <Grid key={category.type} item xs={12} md={6}>
<Card> <Card sx={{ height: '100%' }}>
<CardContent> <CardContent>
<Link <Link
style={{ fontSize: 20 }} style={{ fontSize: 20 }}

View File

@@ -40,7 +40,7 @@ export default function ChangeSpeed() {
.map((_, k) => { .map((_, k) => {
const image = new ImageData(info.width, info.height); const image = new ImageData(info.width, info.height);
reader.decodeAndBlitFrameRGBA(k, image.data as any); reader.decodeAndBlitFrameRGBA(k, image.data);
return image; return image;
}); });
@@ -51,7 +51,6 @@ export default function ChangeSpeed() {
{ loop: 20 } { loop: 20 }
); );
// Decode the GIF
imageDataArr.forEach((imageData) => { imageDataArr.forEach((imageData) => {
const palette = []; const palette = [];
const pixels = new Uint8Array(imageData.width * imageData.height); const pixels = new Uint8Array(imageData.width * imageData.height);
@@ -81,9 +80,8 @@ export default function ChangeSpeed() {
const delay = newSpeed / 10; // Delay in hundredths of a sec (100 = 1s) const delay = newSpeed / 10; // Delay in hundredths of a sec (100 = 1s)
const options: FrameOptions = { const options: FrameOptions = {
// @ts-ignore palette,
palette: new Uint32Array(palette), delay
delay: delay
}; };
gif.addFrame( gif.addFrame(
0, 0,