workbuddy.xpcool.com/.workbuddy/memory/2026-08-31.md

9 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2026-08-31 工作日志
## tool.xpcool.com · 新增「图片转 ICO」工具e65da3a已提交未推送
- 新增 `src/utils/ico.ts`:纯前端零依赖实现 ICO 编码——PNG 编码CRC32/Adler32、自适应行滤波、zlib stored 兜底、调色板位深 1/2/4/8、中位切分量化、32bpp BMP DIBbottom-up BGRA + AND 遮罩、ICO 容器封装;体积控制=编码方式(auto: ≥128 用 PNG)+量化+超限自动降级(先量化→再从大到小删尺寸)。
- 新增 `src/views/image-to-ico/ImageToIcoView.vue`:多尺寸勾选/预设/自定义、填充方式(cover/contain/stretch)、编码方式、量化、体积上限、预览网格、ICO+单尺寸 PNG 下载、历史记录。
- 注册 `src/router/tools.ts`path `image-to-ico`,图标 FileImageIcon更新 README 路由表与特性行。
- 验证vue-tsc 通过esbuild 打包后 Node 跑 8 项二进制自测全过Pillow 独立解码 6 尺寸全过vite build 成功46sImageToIcoView chunk 18.5kB)。
- 关键坑:① PNG 位深<8 时滤波行距必须用 raw.length/height 推导不能用 width×bpp;② ICO 目录项 256 0 表示;③ 非交互环境 git push 无凭据会失败需用户本地推送