├── .gitignore
├── LICENSE
├── README.md
├── README_zh_CN.md
├── build
├── .DS_Store
├── README.md
├── appicon.png
├── darwin
│ ├── Info.dev.plist
│ └── Info.plist
└── windows
│ ├── icon.ico
│ ├── info.json
│ ├── installer
│ ├── project.nsi
│ └── wails_tools.nsh
│ └── wails.exe.manifest
├── frontend
├── .gitignore
├── .npmrc
├── .prettierignore
├── .prettierrc
├── README.md
├── eslint.config.js
├── jsconfig.json
├── package.json
├── package.json.md5
├── pnpm-lock.yaml
├── postcss.config.js
├── src
│ ├── app.css
│ ├── app.d.ts
│ ├── app.html
│ ├── lib
│ │ ├── AppAbout.svelte
│ │ ├── AppButtons.svelte
│ │ ├── AppFilesList.svelte
│ │ ├── AppOptions.svelte
│ │ ├── AppSidebar.svelte
│ │ ├── FileZone.svelte
│ │ ├── app_consts.js
│ │ ├── app_stores.js
│ │ ├── i18n
│ │ │ ├── index.js
│ │ │ └── locales
│ │ │ │ ├── en_US.json
│ │ │ │ ├── zh_CN.json
│ │ │ │ └── zh_TW.json
│ │ ├── settings
│ │ │ ├── CPUSettings.svelte
│ │ │ ├── ImageSettings.svelte
│ │ │ ├── LangSelect.svelte
│ │ │ └── PathSettings.svelte
│ │ └── wailsjs
│ │ │ ├── go
│ │ │ ├── models.ts
│ │ │ └── rmanager
│ │ │ │ ├── AppManager.d.ts
│ │ │ │ ├── AppManager.js
│ │ │ │ ├── FileManager.d.ts
│ │ │ │ ├── FileManager.js
│ │ │ │ ├── TypeManager.d.ts
│ │ │ │ └── TypeManager.js
│ │ │ └── runtime
│ │ │ ├── package.json
│ │ │ ├── runtime.d.ts
│ │ │ └── runtime.js
│ └── routes
│ │ ├── +layout.js
│ │ ├── +layout.svelte
│ │ ├── +page.svelte
│ │ └── settings
│ │ ├── +page.js
│ │ └── +page.svelte
├── static
│ └── favicon.png
├── svelte.config.js
├── tailwind.config.js
└── vite.config.js
├── go.mod
├── go.sum
├── logo.png
├── main.go
├── rimage
├── bmp.go
├── gif.go
├── jpg.go
├── png.go
├── r_format.go
├── r_image.go
├── tiff.go
└── webp.go
├── rmanager
├── app_manager.go
├── event_manager.go
├── file_manager.go
├── jobs_manager.go
└── type_manager.go
├── screenshot.png
└── wails.json
/.gitignore:
--------------------------------------------------------------------------------
1 | build/bin
2 | node_modules
3 | frontend/dist
4 | build/windows/installer/tmp
5 | build_scripts.md
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2024 Barat Semet (https://github.com/barats/)
2 | Resizem is licensed under Mulan PSL v2.
3 | You can use this software according to the terms and conditions of the Mulan PSL v2.
4 | You may obtain a copy of Mulan PSL v2 at:
5 | http://license.coscl.org.cn/MulanPSL2
6 | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
7 | See the Mulan PSL v2 for more details.
8 |
9 |
10 | Mulan Permissive Software License,Version 2
11 |
12 | Mulan Permissive Software License,Version 2 (Mulan PSL v2)
13 | January 2020 http://license.coscl.org.cn/MulanPSL2
14 |
15 | Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:
16 |
17 | 0. Definition
18 |
19 | Software means the program and related documents which are licensed under this License and comprise all Contribution(s).
20 |
21 | Contribution means the copyrightable work licensed by a particular Contributor under this License.
22 |
23 | Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License.
24 |
25 | Legal Entity means the entity making a Contribution and all its Affiliates.
26 |
27 | Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.
28 |
29 | 1. Grant of Copyright License
30 |
31 | Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.
32 |
33 | 2. Grant of Patent License
34 |
35 | Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.
36 |
37 | 3. No Trademark License
38 |
39 | No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in Section 4.
40 |
41 | 4. Distribution Restriction
42 |
43 | You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.
44 |
45 | 5. Disclaimer of Warranty and Limitation of Liability
46 |
47 | THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
48 |
49 | 6. Language
50 |
51 | THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.
52 |
53 | END OF THE TERMS AND CONDITIONS
54 |
55 |
56 | 木兰宽松许可证, 第2版
57 |
58 | 木兰宽松许可证, 第2版
59 | 2020年1月 http://license.coscl.org.cn/MulanPSL2
60 |
61 |
62 | 您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束:
63 |
64 | 0. 定义
65 |
66 | “软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。
67 |
68 | “贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。
69 |
70 | “贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。
71 |
72 | “法人实体”是指提交贡献的机构及其“关联实体”。
73 |
74 | “关联实体”是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。
75 |
76 | 1. 授予版权许可
77 |
78 | 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。
79 |
80 | 2. 授予专利许可
81 |
82 | 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。
83 |
84 | 3. 无商标许可
85 |
86 | “本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。
87 |
88 | 4. 分发限制
89 |
90 | 您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。
91 |
92 | 5. 免责声明与责任限制
93 |
94 | “软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。
95 |
96 | 6. 语言
97 | “本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。
98 |
99 | 条款结束
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Resizem
2 |
3 |
4 | **Resizem (combine "resize" with "them")** is an app designed for **bulk image process.** It is particularly useful for users who need to resize, convert, and manage large numbers of image files at once. It supports a variety of formats like JPG, JPEG, PNG, GIF, BMP, TIFF and WebP. It also allows you to set custom dimensions while ensuring the quality of the image remains intact (with resampling filters).
5 |
6 | 
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | ## Features
15 |
16 | 1. Bulk image reszie and convert
17 | 1. Simple & easy UI with support for custom settings
18 | 1. Rich format support: JPG,JPEG,PNG,GIF,BMP,TIF,TIFF and WebP
19 | 1. Multiple resamping filters: NearestNeighbor, Box, Linear, Hermite, MitchellNetravali, CatmullRom, BSpline, Gaussian, Lanczos, Hann, Hamming, Blackman, Bartlett, Welch, Cosine
20 |
21 | ## Technical details
22 |
23 | **Resizem** uses **Golang** to do the "resize and convert" work and **Svelte** + **Flowbite Svelte** + **TailwindCSS** for frontend work.
24 |
25 | **This is glued together as a single binary with native rendering by the fantastic [Wails](https://wails.io) framework.**
26 |
27 | ## Download and installation
28 |
29 | Resizem can run on the following operating systems:
30 |
31 | 1. Windows 10/11 amd64/arm64
32 | 1. Linux amd64/arm64
33 | 1. macOS 10.13+ amd64 (Intel)
34 | 1. macOS 11.0+ arm64 (Apple Silicon)
35 |
36 | ## Pre-compiled binaries
37 |
38 | You can obtain a pre-compiled Resizem binary for macOS/Windows/Linux from the [release page](https://github.com/barats/resizem/releases).
39 |
40 | ## Compiling from source
41 |
42 | Before building Resizem, please prepare the building environment as follows:
43 |
44 | 1. Download Go from [Go Download Page](https://go.dev/dl/), Go version 1.20
45 | 2. Download NPM from the [Node Downloads Page](https://go.dev/doc/install) , Node version 20.15
46 | 3. Install Wails via [Wails Installation Page](https://wails.io/docs/gettingstarted/installation/), Wails version 2.9.2
47 | 4. Go to project home path and run `wails build`, more build flag could be found at [Wails CLI Reference](https://wails.io/docs/reference/cli#build)
48 |
49 | ## License
50 |
51 | ```
52 | Copyright (c) [2024] [Barat Semet]
53 | [Resizem] is licensed under Mulan PSL v2.
54 | You can use this software according to the terms and conditions of the Mulan PSL v2.
55 | You may obtain a copy of Mulan PSL v2 at:
56 | http://license.coscl.org.cn/MulanPSL2
57 | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
58 | EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
59 | MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
60 | See the Mulan PSL v2 for more details.
61 | ```
62 |
63 | ## Give Thanks To
64 |
65 | 1. [Wails.io](https://wails.io) - Amazing project that could build cross-platform applications using Go
66 | 1. [Flowbite Svelte](https://flowbite-svelte.com) - Official Flowbite component library for Svelte
67 | 1. [TailwindCSS](https://tailwindcss.com) - A utility-first CSS framework that can be composed to build any design, directly in markup
68 | 1. [disintegration/imaging](https://github.com/disintegration/imaging) - Amazing yet simple image processing package for Go
69 |
70 | ## Collaboration
71 |
72 | If you find this app useful, or are interested in open source collaboration, you can try:
73 |
74 | 1. Provide feedback on problems encountered while you're using this app
75 | 1. Explore source code and submit appropriate and necessary PRs
76 | 1. Translate this app into other languages(put language files in `frontend/src/lib/i18n/locales/` and draft new PR)
77 |
78 |
79 | ## Release
80 |
81 | 1. Github [https://github.com/barats/resizem](https://github.com/barats/resizem)
82 | 1. Gitee [https://gitee.com/barat/resizem](https://gitee.com/barat/resizem)
83 |
84 | ## Github Stargazers
85 | [](https://starchart.cc/barats/resizem)
--------------------------------------------------------------------------------
/README_zh_CN.md:
--------------------------------------------------------------------------------
1 | # Resizem
2 |
3 | **Resizem (将resize与them组合)** 是一款专为批量处理图片而设计的应用软件。对于需要同时调整、转换和管理大量图片文件的用户来说,这款应用尤其有用。它支持多种格式,如 JPG、JPEG、PNG、GIF、BMP、TIFF 和 WebP。它还允许您设置自定义尺寸,同时确保图片质量保持不变(使用重采样滤镜)。
4 |
5 | 
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | ## 主要功能
14 |
15 | 1. **批量**图片等比缩放/扩大,以及类型转换
16 | 1. 简单易用的用户界面,支持自定义设置
17 | 1. 丰富的图片类型支持,包括: JPG,JPEG,PNG,GIF,BMP,TIF,TIFF 和 WebP 格式
18 | 1. 多种过滤器支持:NearestNeighbor, Box, Linear, Hermite, MitchellNetravali, CatmullRom, BSpline, Gaussian, Lanczos, Hann, Hamming, Blackman, Bartlett, Welch, Cosine
19 |
20 | ## 技术细节
21 |
22 | **Resizem** 使用 **Golang** 实现 ”图片缩放/扩大和类型转换“ 后端功能;软件界面部分,采用了 **Svelte** + **Flowbite Svelte** + **TailwindCSS** 的纯前端技术
23 |
24 | **至于Golang后端和前端程序之间的“通信”和“打通”等问题,使用非常优秀的 [Wails](https://wails.io) 框架实现**
25 |
26 | ## 下载安装
27 |
28 | Resizem 支持以下操作系统版本和架构:
29 |
30 | 1. Windows 10/11 amd64/arm64
31 | 1. Linux amd64/arm64
32 | 1. macOS 10.13+ amd64 (Intel)
33 | 1. macOS 11.0+ arm64 (Apple Silicon)
34 |
35 | ## 发行版
36 |
37 | 您可以通过 [release page](https://gitee.com/barat/resizem/releases) 下载 macOS/Windows/Linux 系统支持的二进制文件并直接安装使用
38 |
39 | ## 源码编译
40 |
41 | 在编译 Resizem 之前,请确保配置好如下编译环境和工具:
42 |
43 | 1. 从 [Go Download Page](https://go.dev/dl/) 下载并安装 Go,建议版本 Go 1.20
44 | 2. 从 [Node Downloads Page](https://go.dev/doc/install) 下载并安装 NodeJS,建议版本 Node 20.15
45 | 3. 遵从 [Wails Installation Page](https://wails.io/docs/gettingstarted/installation/) 指导安装 Wails 命令行工具,建议版本 Wails 2.9.2
46 | 4. 在项目根本目录执行 `wails build`,更多命令行 flag 参数请参考 [Wails CLI Reference](https://wails.io/docs/reference/cli#build)
47 |
48 | ## 开源协议
49 |
50 | **Resizem** 遵循国产《木兰宽松许可协议》
51 |
52 | ```
53 | Copyright (c) [2024] [Barat Semet]
54 | [Resizem] is licensed under Mulan PSL v2.
55 | You can use this software according to the terms and conditions of the Mulan PSL v2.
56 | You may obtain a copy of Mulan PSL v2 at:
57 | http://license.coscl.org.cn/MulanPSL2
58 | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
59 | EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
60 | MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
61 | See the Mulan PSL v2 for more details.
62 | ```
63 |
64 | ## 特别鸣谢
65 |
66 | 1. [Wails.io](https://wails.io)
67 | 1. [Flowbite Svelte](https://flowbite-svelte.com)
68 | 1. [TailwindCSS](https://tailwindcss.com)
69 | 1. [disintegration/imaging](https://github.com/disintegration/imaging)
70 |
71 | ## 开源协作
72 |
73 | 如果您觉得此软件对您有用,或者对开源协作感兴趣,您可以尝试:
74 |
75 | 1. 积极反馈使用过程中出现的问题
76 | 1. 阅读源码并提出合适且必要的PR
77 | 1. 将此应用翻译为其他语言(将语言文件放置 `frontend/src/lib/i18n/locales/` 并提交PR)
78 |
79 | ## 发布渠道
80 |
81 | 1. Github [https://github.com/barats/resizem](https://github.com/barats/resizem)
82 | 1. Gitee [https://gitee.com/barat/resizem](https://gitee.com/barat/resizem)
83 |
84 | ## Github Stargazers
85 | [](https://starchart.cc/barats/resizem)
--------------------------------------------------------------------------------
/build/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barats/resizem/75f87fa5e324719f5bfbdf691bce4116624594bd/build/.DS_Store
--------------------------------------------------------------------------------
/build/README.md:
--------------------------------------------------------------------------------
1 | # Build Directory
2 |
3 | The build directory is used to house all the build files and assets for your application.
4 |
5 | The structure is:
6 |
7 | * bin - Output directory
8 | * darwin - macOS specific files
9 | * windows - Windows specific files
10 |
11 | ## Mac
12 |
13 | The `darwin` directory holds files specific to Mac builds.
14 | These may be customised and used as part of the build. To return these files to the default state, simply delete them
15 | and
16 | build with `wails build`.
17 |
18 | The directory contains the following files:
19 |
20 | - `Info.plist` - the main plist file used for Mac builds. It is used when building using `wails build`.
21 | - `Info.dev.plist` - same as the main plist file but used when building using `wails dev`.
22 |
23 | ## Windows
24 |
25 | The `windows` directory contains the manifest and rc files used when building with `wails build`.
26 | These may be customised for your application. To return these files to the default state, simply delete them and
27 | build with `wails build`.
28 |
29 | - `icon.ico` - The icon used for the application. This is used when building using `wails build`. If you wish to
30 | use a different icon, simply replace this file with your own. If it is missing, a new `icon.ico` file
31 | will be created using the `appicon.png` file in the build directory.
32 | - `installer/*` - The files used to create the Windows installer. These are used when building using `wails build`.
33 | - `info.json` - Application details used for Windows builds. The data here will be used by the Windows installer,
34 | as well as the application itself (right click the exe -> properties -> details)
35 | - `wails.exe.manifest` - The main application manifest file.
--------------------------------------------------------------------------------
/build/appicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barats/resizem/75f87fa5e324719f5bfbdf691bce4116624594bd/build/appicon.png
--------------------------------------------------------------------------------
/build/darwin/Info.dev.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CFBundlePackageType
5 | APPL
6 | CFBundleName
7 | {{.Info.ProductName}}
8 | CFBundleExecutable
9 | {{.Name}}
10 | CFBundleIdentifier
11 | com.wails.{{.Name}}
12 | CFBundleVersion
13 | {{.Info.ProductVersion}}
14 | CFBundleGetInfoString
15 | {{.Info.Comments}}
16 | CFBundleShortVersionString
17 | {{.Info.ProductVersion}}
18 | CFBundleIconFile
19 | iconfile
20 | LSMinimumSystemVersion
21 | 10.13.0
22 | NSHighResolutionCapable
23 | true
24 | NSHumanReadableCopyright
25 | {{.Info.Copyright}}
26 | {{if .Info.FileAssociations}}
27 | CFBundleDocumentTypes
28 |
29 | {{range .Info.FileAssociations}}
30 |
31 | CFBundleTypeExtensions
32 |
33 | {{.Ext}}
34 |
35 | CFBundleTypeName
36 | {{.Name}}
37 | CFBundleTypeRole
38 | {{.Role}}
39 | CFBundleTypeIconFile
40 | {{.IconName}}
41 |
42 | {{end}}
43 |
44 | {{end}}
45 | {{if .Info.Protocols}}
46 | CFBundleURLTypes
47 |
48 | {{range .Info.Protocols}}
49 |
50 | CFBundleURLName
51 | com.wails.{{.Scheme}}
52 | CFBundleURLSchemes
53 |
54 | {{.Scheme}}
55 |
56 | CFBundleTypeRole
57 | {{.Role}}
58 |
59 | {{end}}
60 |
61 | {{end}}
62 | NSAppTransportSecurity
63 |
64 | NSAllowsLocalNetworking
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/build/darwin/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CFBundlePackageType
5 | APPL
6 | CFBundleName
7 | {{.Info.ProductName}}
8 | CFBundleExecutable
9 | {{.Name}}
10 | CFBundleIdentifier
11 | com.wails.{{.Name}}
12 | CFBundleVersion
13 | {{.Info.ProductVersion}}
14 | CFBundleGetInfoString
15 | {{.Info.Comments}}
16 | CFBundleShortVersionString
17 | {{.Info.ProductVersion}}
18 | CFBundleIconFile
19 | iconfile
20 | LSMinimumSystemVersion
21 | 10.13.0
22 | NSHighResolutionCapable
23 | true
24 | NSHumanReadableCopyright
25 | {{.Info.Copyright}}
26 | {{if .Info.FileAssociations}}
27 | CFBundleDocumentTypes
28 |
29 | {{range .Info.FileAssociations}}
30 |
31 | CFBundleTypeExtensions
32 |
33 | {{.Ext}}
34 |
35 | CFBundleTypeName
36 | {{.Name}}
37 | CFBundleTypeRole
38 | {{.Role}}
39 | CFBundleTypeIconFile
40 | {{.IconName}}
41 |
42 | {{end}}
43 |
44 | {{end}}
45 | {{if .Info.Protocols}}
46 | CFBundleURLTypes
47 |
48 | {{range .Info.Protocols}}
49 |
50 | CFBundleURLName
51 | com.wails.{{.Scheme}}
52 | CFBundleURLSchemes
53 |
54 | {{.Scheme}}
55 |
56 | CFBundleTypeRole
57 | {{.Role}}
58 |
59 | {{end}}
60 |
61 | {{end}}
62 |
63 |
64 |
--------------------------------------------------------------------------------
/build/windows/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barats/resizem/75f87fa5e324719f5bfbdf691bce4116624594bd/build/windows/icon.ico
--------------------------------------------------------------------------------
/build/windows/info.json:
--------------------------------------------------------------------------------
1 | {
2 | "fixed": {
3 | "file_version": "{{.Info.ProductVersion}}"
4 | },
5 | "info": {
6 | "0000": {
7 | "ProductVersion": "{{.Info.ProductVersion}}",
8 | "CompanyName": "{{.Info.CompanyName}}",
9 | "FileDescription": "{{.Info.ProductName}}",
10 | "LegalCopyright": "{{.Info.Copyright}}",
11 | "ProductName": "{{.Info.ProductName}}",
12 | "Comments": "{{.Info.Comments}}"
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/build/windows/installer/project.nsi:
--------------------------------------------------------------------------------
1 | Unicode true
2 |
3 | ####
4 | ## Please note: Template replacements don't work in this file. They are provided with default defines like
5 | ## mentioned underneath.
6 | ## If the keyword is not defined, "wails_tools.nsh" will populate them with the values from ProjectInfo.
7 | ## If they are defined here, "wails_tools.nsh" will not touch them. This allows to use this project.nsi manually
8 | ## from outside of Wails for debugging and development of the installer.
9 | ##
10 | ## For development first make a wails nsis build to populate the "wails_tools.nsh":
11 | ## > wails build --target windows/amd64 --nsis
12 | ## Then you can call makensis on this file with specifying the path to your binary:
13 | ## For a AMD64 only installer:
14 | ## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app.exe
15 | ## For a ARM64 only installer:
16 | ## > makensis -DARG_WAILS_ARM64_BINARY=..\..\bin\app.exe
17 | ## For a installer with both architectures:
18 | ## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app-amd64.exe -DARG_WAILS_ARM64_BINARY=..\..\bin\app-arm64.exe
19 | ####
20 | ## The following information is taken from the ProjectInfo file, but they can be overwritten here.
21 | ####
22 | ## !define INFO_PROJECTNAME "MyProject" # Default "{{.Name}}"
23 | ## !define INFO_COMPANYNAME "MyCompany" # Default "{{.Info.CompanyName}}"
24 | ## !define INFO_PRODUCTNAME "MyProduct" # Default "{{.Info.ProductName}}"
25 | ## !define INFO_PRODUCTVERSION "1.0.0" # Default "{{.Info.ProductVersion}}"
26 | ## !define INFO_COPYRIGHT "Copyright" # Default "{{.Info.Copyright}}"
27 | ###
28 | ## !define PRODUCT_EXECUTABLE "Application.exe" # Default "${INFO_PROJECTNAME}.exe"
29 | ## !define UNINST_KEY_NAME "UninstKeyInRegistry" # Default "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
30 | ####
31 | ## !define REQUEST_EXECUTION_LEVEL "admin" # Default "admin" see also https://nsis.sourceforge.io/Docs/Chapter4.html
32 | ####
33 | ## Include the wails tools
34 | ####
35 | !include "wails_tools.nsh"
36 |
37 | # The version information for this two must consist of 4 parts
38 | VIProductVersion "${INFO_PRODUCTVERSION}.0"
39 | VIFileVersion "${INFO_PRODUCTVERSION}.0"
40 |
41 | VIAddVersionKey "CompanyName" "${INFO_COMPANYNAME}"
42 | VIAddVersionKey "FileDescription" "${INFO_PRODUCTNAME} Installer"
43 | VIAddVersionKey "ProductVersion" "${INFO_PRODUCTVERSION}"
44 | VIAddVersionKey "FileVersion" "${INFO_PRODUCTVERSION}"
45 | VIAddVersionKey "LegalCopyright" "${INFO_COPYRIGHT}"
46 | VIAddVersionKey "ProductName" "${INFO_PRODUCTNAME}"
47 |
48 | # Enable HiDPI support. https://nsis.sourceforge.io/Reference/ManifestDPIAware
49 | ManifestDPIAware true
50 |
51 | !include "MUI.nsh"
52 |
53 | !define MUI_ICON "..\icon.ico"
54 | !define MUI_UNICON "..\icon.ico"
55 | # !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\leftimage.bmp" #Include this to add a bitmap on the left side of the Welcome Page. Must be a size of 164x314
56 | !define MUI_FINISHPAGE_NOAUTOCLOSE # Wait on the INSTFILES page so the user can take a look into the details of the installation steps
57 | !define MUI_ABORTWARNING # This will warn the user if they exit from the installer.
58 |
59 | !insertmacro MUI_PAGE_WELCOME # Welcome to the installer page.
60 | # !insertmacro MUI_PAGE_LICENSE "resources\eula.txt" # Adds a EULA page to the installer
61 | !insertmacro MUI_PAGE_DIRECTORY # In which folder install page.
62 | !insertmacro MUI_PAGE_INSTFILES # Installing page.
63 | !insertmacro MUI_PAGE_FINISH # Finished installation page.
64 |
65 | !insertmacro MUI_UNPAGE_INSTFILES # Uinstalling page
66 |
67 | !insertmacro MUI_LANGUAGE "English" # Set the Language of the installer
68 |
69 | ## The following two statements can be used to sign the installer and the uninstaller. The path to the binaries are provided in %1
70 | #!uninstfinalize 'signtool --file "%1"'
71 | #!finalize 'signtool --file "%1"'
72 |
73 | Name "${INFO_PRODUCTNAME}"
74 | OutFile "..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file.
75 | InstallDir "$PROGRAMFILES64\${INFO_PRODUCTNAME}" # Default installing folder ($PROGRAMFILES is Program Files folder).
76 | ShowInstDetails show # This will always show the installation details.
77 |
78 | Function .onInit
79 | !insertmacro wails.checkArchitecture
80 | FunctionEnd
81 |
82 | Section
83 | !insertmacro wails.setShellContext
84 |
85 | !insertmacro wails.webview2runtime
86 |
87 | SetOutPath $INSTDIR
88 |
89 | !insertmacro wails.files
90 |
91 | CreateShortcut "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
92 | CreateShortCut "$DESKTOP\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
93 |
94 | !insertmacro wails.associateFiles
95 | !insertmacro wails.associateCustomProtocols
96 |
97 | !insertmacro wails.writeUninstaller
98 | SectionEnd
99 |
100 | Section "uninstall"
101 | !insertmacro wails.setShellContext
102 |
103 | RMDir /r "$AppData\${PRODUCT_EXECUTABLE}" # Remove the WebView2 DataPath
104 |
105 | RMDir /r $INSTDIR
106 |
107 | Delete "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk"
108 | Delete "$DESKTOP\${INFO_PRODUCTNAME}.lnk"
109 |
110 | !insertmacro wails.unassociateFiles
111 | !insertmacro wails.unassociateCustomProtocols
112 |
113 | !insertmacro wails.deleteUninstaller
114 | SectionEnd
115 |
--------------------------------------------------------------------------------
/build/windows/installer/wails_tools.nsh:
--------------------------------------------------------------------------------
1 | # DO NOT EDIT - Generated automatically by `wails build`
2 |
3 | !include "x64.nsh"
4 | !include "WinVer.nsh"
5 | !include "FileFunc.nsh"
6 |
7 | !ifndef INFO_PROJECTNAME
8 | !define INFO_PROJECTNAME "Resizem"
9 | !endif
10 | !ifndef INFO_COMPANYNAME
11 | !define INFO_COMPANYNAME "Resizem"
12 | !endif
13 | !ifndef INFO_PRODUCTNAME
14 | !define INFO_PRODUCTNAME "Resizem"
15 | !endif
16 | !ifndef INFO_PRODUCTVERSION
17 | !define INFO_PRODUCTVERSION "1.0.0"
18 | !endif
19 | !ifndef INFO_COPYRIGHT
20 | !define INFO_COPYRIGHT "Barat Semet"
21 | !endif
22 | !ifndef PRODUCT_EXECUTABLE
23 | !define PRODUCT_EXECUTABLE "${INFO_PROJECTNAME}.exe"
24 | !endif
25 | !ifndef UNINST_KEY_NAME
26 | !define UNINST_KEY_NAME "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
27 | !endif
28 | !define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINST_KEY_NAME}"
29 |
30 | !ifndef REQUEST_EXECUTION_LEVEL
31 | !define REQUEST_EXECUTION_LEVEL "admin"
32 | !endif
33 |
34 | RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"
35 |
36 | !ifdef ARG_WAILS_AMD64_BINARY
37 | !define SUPPORTS_AMD64
38 | !endif
39 |
40 | !ifdef ARG_WAILS_ARM64_BINARY
41 | !define SUPPORTS_ARM64
42 | !endif
43 |
44 | !ifdef SUPPORTS_AMD64
45 | !ifdef SUPPORTS_ARM64
46 | !define ARCH "amd64_arm64"
47 | !else
48 | !define ARCH "amd64"
49 | !endif
50 | !else
51 | !ifdef SUPPORTS_ARM64
52 | !define ARCH "arm64"
53 | !else
54 | !error "Wails: Undefined ARCH, please provide at least one of ARG_WAILS_AMD64_BINARY or ARG_WAILS_ARM64_BINARY"
55 | !endif
56 | !endif
57 |
58 | !macro wails.checkArchitecture
59 | !ifndef WAILS_WIN10_REQUIRED
60 | !define WAILS_WIN10_REQUIRED "This product is only supported on Windows 10 (Server 2016) and later."
61 | !endif
62 |
63 | !ifndef WAILS_ARCHITECTURE_NOT_SUPPORTED
64 | !define WAILS_ARCHITECTURE_NOT_SUPPORTED "This product can't be installed on the current Windows architecture. Supports: ${ARCH}"
65 | !endif
66 |
67 | ${If} ${AtLeastWin10}
68 | !ifdef SUPPORTS_AMD64
69 | ${if} ${IsNativeAMD64}
70 | Goto ok
71 | ${EndIf}
72 | !endif
73 |
74 | !ifdef SUPPORTS_ARM64
75 | ${if} ${IsNativeARM64}
76 | Goto ok
77 | ${EndIf}
78 | !endif
79 |
80 | IfSilent silentArch notSilentArch
81 | silentArch:
82 | SetErrorLevel 65
83 | Abort
84 | notSilentArch:
85 | MessageBox MB_OK "${WAILS_ARCHITECTURE_NOT_SUPPORTED}"
86 | Quit
87 | ${else}
88 | IfSilent silentWin notSilentWin
89 | silentWin:
90 | SetErrorLevel 64
91 | Abort
92 | notSilentWin:
93 | MessageBox MB_OK "${WAILS_WIN10_REQUIRED}"
94 | Quit
95 | ${EndIf}
96 |
97 | ok:
98 | !macroend
99 |
100 | !macro wails.files
101 | !ifdef SUPPORTS_AMD64
102 | ${if} ${IsNativeAMD64}
103 | File "/oname=${PRODUCT_EXECUTABLE}" "${ARG_WAILS_AMD64_BINARY}"
104 | ${EndIf}
105 | !endif
106 |
107 | !ifdef SUPPORTS_ARM64
108 | ${if} ${IsNativeARM64}
109 | File "/oname=${PRODUCT_EXECUTABLE}" "${ARG_WAILS_ARM64_BINARY}"
110 | ${EndIf}
111 | !endif
112 | !macroend
113 |
114 | !macro wails.writeUninstaller
115 | WriteUninstaller "$INSTDIR\uninstall.exe"
116 |
117 | SetRegView 64
118 | WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}"
119 | WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}"
120 | WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}"
121 | WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}"
122 | WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
123 | WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
124 |
125 | ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
126 | IntFmt $0 "0x%08X" $0
127 | WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" "$0"
128 | !macroend
129 |
130 | !macro wails.deleteUninstaller
131 | Delete "$INSTDIR\uninstall.exe"
132 |
133 | SetRegView 64
134 | DeleteRegKey HKLM "${UNINST_KEY}"
135 | !macroend
136 |
137 | !macro wails.setShellContext
138 | ${If} ${REQUEST_EXECUTION_LEVEL} == "admin"
139 | SetShellVarContext all
140 | ${else}
141 | SetShellVarContext current
142 | ${EndIf}
143 | !macroend
144 |
145 | # Install webview2 by launching the bootstrapper
146 | # See https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#online-only-deployment
147 | !macro wails.webview2runtime
148 | !ifndef WAILS_INSTALL_WEBVIEW_DETAILPRINT
149 | !define WAILS_INSTALL_WEBVIEW_DETAILPRINT "Installing: WebView2 Runtime"
150 | !endif
151 |
152 | SetRegView 64
153 | # If the admin key exists and is not empty then webview2 is already installed
154 | ReadRegStr $0 HKLM "SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
155 | ${If} $0 != ""
156 | Goto ok
157 | ${EndIf}
158 |
159 | ${If} ${REQUEST_EXECUTION_LEVEL} == "user"
160 | # If the installer is run in user level, check the user specific key exists and is not empty then webview2 is already installed
161 | ReadRegStr $0 HKCU "Software\Microsoft\EdgeUpdate\Clients{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
162 | ${If} $0 != ""
163 | Goto ok
164 | ${EndIf}
165 | ${EndIf}
166 |
167 | SetDetailsPrint both
168 | DetailPrint "${WAILS_INSTALL_WEBVIEW_DETAILPRINT}"
169 | SetDetailsPrint listonly
170 |
171 | InitPluginsDir
172 | CreateDirectory "$pluginsdir\webview2bootstrapper"
173 | SetOutPath "$pluginsdir\webview2bootstrapper"
174 | File "tmp\MicrosoftEdgeWebview2Setup.exe"
175 | ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install'
176 |
177 | SetDetailsPrint both
178 | ok:
179 | !macroend
180 |
181 | # Copy of APP_ASSOCIATE and APP_UNASSOCIATE macros from here https://gist.github.com/nikku/281d0ef126dbc215dd58bfd5b3a5cd5b
182 | !macro APP_ASSOCIATE EXT FILECLASS DESCRIPTION ICON COMMANDTEXT COMMAND
183 | ; Backup the previously associated file class
184 | ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\.${EXT}" ""
185 | WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "${FILECLASS}_backup" "$R0"
186 |
187 | WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "" "${FILECLASS}"
188 |
189 | WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}" "" `${DESCRIPTION}`
190 | WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\DefaultIcon" "" `${ICON}`
191 | WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell" "" "open"
192 | WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell\open" "" `${COMMANDTEXT}`
193 | WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell\open\command" "" `${COMMAND}`
194 | !macroend
195 |
196 | !macro APP_UNASSOCIATE EXT FILECLASS
197 | ; Backup the previously associated file class
198 | ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\.${EXT}" `${FILECLASS}_backup`
199 | WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "" "$R0"
200 |
201 | DeleteRegKey SHELL_CONTEXT `Software\Classes\${FILECLASS}`
202 | !macroend
203 |
204 | !macro wails.associateFiles
205 | ; Create file associations
206 |
207 | !macroend
208 |
209 | !macro wails.unassociateFiles
210 | ; Delete app associations
211 |
212 | !macroend
213 |
214 | !macro CUSTOM_PROTOCOL_ASSOCIATE PROTOCOL DESCRIPTION ICON COMMAND
215 | DeleteRegKey SHELL_CONTEXT "Software\Classes\${PROTOCOL}"
216 | WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}" "" "${DESCRIPTION}"
217 | WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}" "URL Protocol" ""
218 | WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\DefaultIcon" "" "${ICON}"
219 | WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell" "" ""
220 | WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell\open" "" ""
221 | WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell\open\command" "" "${COMMAND}"
222 | !macroend
223 |
224 | !macro CUSTOM_PROTOCOL_UNASSOCIATE PROTOCOL
225 | DeleteRegKey SHELL_CONTEXT "Software\Classes\${PROTOCOL}"
226 | !macroend
227 |
228 | !macro wails.associateCustomProtocols
229 | ; Create custom protocols associations
230 |
231 | !macroend
232 |
233 | !macro wails.unassociateCustomProtocols
234 | ; Delete app custom protocol associations
235 |
236 | !macroend
237 |
--------------------------------------------------------------------------------
/build/windows/wails.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | true/pm
12 | permonitorv2,permonitor
13 |
14 |
15 |
--------------------------------------------------------------------------------
/frontend/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
3 | # Output
4 | .output
5 | .vercel
6 | /.svelte-kit
7 | /build
8 |
9 | # OS
10 | .DS_Store
11 | Thumbs.db
12 |
13 | # Env
14 | .env
15 | .env.*
16 | !.env.example
17 | !.env.test
18 |
19 | # Vite
20 | vite.config.js.timestamp-*
21 | vite.config.ts.timestamp-*
22 |
--------------------------------------------------------------------------------
/frontend/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/frontend/.prettierignore:
--------------------------------------------------------------------------------
1 | # Package Managers
2 | package-lock.json
3 | pnpm-lock.yaml
4 | yarn.lock
5 |
--------------------------------------------------------------------------------
/frontend/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "useTabs": true,
3 | "singleQuote": true,
4 | "trailingComma": "none",
5 | "printWidth": 100,
6 | "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
7 | "overrides": [
8 | {
9 | "files": "*.svelte",
10 | "options": {
11 | "parser": "svelte"
12 | }
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/frontend/README.md:
--------------------------------------------------------------------------------
1 | # Resizem Frontend
2 |
3 | Using Svelte + FlowbiteSvelte + Tailwind CSS
4 |
--------------------------------------------------------------------------------
/frontend/eslint.config.js:
--------------------------------------------------------------------------------
1 | import js from '@eslint/js';
2 | import svelte from 'eslint-plugin-svelte';
3 | import prettier from 'eslint-config-prettier';
4 | import globals from 'globals';
5 |
6 | /** @type {import('eslint').Linter.Config[]} */
7 | export default [
8 | js.configs.recommended,
9 | ...svelte.configs['flat/recommended'],
10 | prettier,
11 | ...svelte.configs['flat/prettier'],
12 | {
13 | languageOptions: {
14 | globals: {
15 | ...globals.browser,
16 | ...globals.node
17 | }
18 | }
19 | },
20 | {
21 | ignores: ['build/', '.svelte-kit/', 'dist/']
22 | }
23 | ];
24 |
--------------------------------------------------------------------------------
/frontend/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./.svelte-kit/tsconfig.json",
3 | "compilerOptions": {
4 | "allowJs": true,
5 | "checkJs": true,
6 | "esModuleInterop": true,
7 | "forceConsistentCasingInFileNames": true,
8 | "resolveJsonModule": true,
9 | "skipLibCheck": true,
10 | "sourceMap": true,
11 | "strict": false,
12 | "moduleResolution": "bundler",
13 | "allowImportingTsExtensions": true
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "resizem-gui",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "vite dev",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
10 | "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
11 | "lint": "prettier --check . && eslint .",
12 | "format": "prettier --write ."
13 | },
14 | "devDependencies": {
15 | "@macfja/svelte-persistent-store": "^2.4.1",
16 | "@sveltejs/adapter-static": "^3.0.4",
17 | "@sveltejs/kit": "^2.0.0",
18 | "@sveltejs/vite-plugin-svelte": "^3.0.0",
19 | "@types/eslint": "^9.6.0",
20 | "autoprefixer": "^10.4.20",
21 | "eslint": "^9.0.0",
22 | "eslint-config-prettier": "^9.1.0",
23 | "eslint-plugin-svelte": "^2.36.0",
24 | "flowbite": "^2.5.1",
25 | "flowbite-svelte": "^0.46.16",
26 | "flowbite-svelte-icons": "^1.6.1",
27 | "globals": "^15.0.0",
28 | "prettier": "^3.1.1",
29 | "prettier-plugin-svelte": "^3.1.2",
30 | "prettier-plugin-tailwindcss": "^0.6.5",
31 | "svelte": "^4.2.7",
32 | "svelte-check": "^4.0.0",
33 | "svelte-i18n": "^4.0.0",
34 | "tailwindcss": "^3.4.9",
35 | "typescript": "^5.0.0",
36 | "vite": "^5.0.3"
37 | },
38 | "type": "module"
39 | }
40 |
--------------------------------------------------------------------------------
/frontend/package.json.md5:
--------------------------------------------------------------------------------
1 | 432a2e2299938c9b3cce03c83ed558d3
--------------------------------------------------------------------------------
/frontend/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {}
5 | }
6 | };
7 |
--------------------------------------------------------------------------------
/frontend/src/app.css:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2024 Barat Semet (https://github.com/barats)
2 | Resizem is licensed under Mulan PSL v2.
3 | You can use this software according to the terms and conditions of the Mulan PSL v2.
4 | You may obtain a copy of Mulan PSL v2 at:
5 | http://license.coscl.org.cn/MulanPSL2
6 | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7 | EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8 | MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9 | See the Mulan PSL v2 for more details. */
10 |
11 | @import 'tailwindcss/base';
12 | @import 'tailwindcss/components';
13 | @import 'tailwindcss/utilities';
14 |
15 | body {
16 | background-color: white;
17 | }
18 |
--------------------------------------------------------------------------------
/frontend/src/app.d.ts:
--------------------------------------------------------------------------------
1 | // See https://kit.svelte.dev/docs/types#app
2 | // for information about these interfaces
3 | declare global {
4 | namespace App {
5 | // interface Error {}
6 | // interface Locals {}
7 | // interface PageData {}
8 | // interface PageState {}
9 | // interface Platform {}
10 | }
11 | }
12 |
13 | export {};
14 |
--------------------------------------------------------------------------------
/frontend/src/app.html:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | %sveltekit.head%
18 |
19 |
20 |
63 | {/if}
64 |
65 |
--------------------------------------------------------------------------------
/frontend/src/lib/app_consts.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2024 Barat Semet (https://github.com/barats)
2 | // Resizem is licensed under Mulan PSL v2.
3 | // You can use this software according to the terms and conditions of the Mulan PSL v2.
4 | // You may obtain a copy of Mulan PSL v2 at:
5 | // http://license.coscl.org.cn/MulanPSL2
6 | // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7 | // EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8 | // MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9 | // See the Mulan PSL v2 for more details.
10 |
11 | import { version } from '$app/environment';
12 |
13 | //Keys for stores
14 | export const KEY_DOING = 'resizem-' + version + '-doing';
15 | export const KEY_ASK_WHERE_TO_SAVE = 'resizem-' + version + '-ask-where-to-save';
16 | export const KEY_FILES_LIST = 'resizem-' + version + '-files-list';
17 | export const KEY_RESULT_LIST = 'resizem-' + version + '-result-list';
18 | export const KEY_FORMAT_VALUE = 'resizem-' + version + '-format-value';
19 | export const KEY_FILTER_VALUE = 'resizem-' + version + '-filter-value';
20 | export const KEY_WIDTH_VALUE = 'resizem-' + version + '-width-value';
21 | export const KEY_HEIGHT_VALUE = 'resizem-' + version + '-height-value';
22 | export const KEY_CPU_VALUE = 'resizem-' + version + '-cpu-usage-value';
23 | export const KEY_JPEG_QUALITY_VALUE = 'resizem-' + version + '-jpeg-quality-value';
24 | export const KEY_GIF_COLORS_VALUE = 'resizem-' + version + '-gif-colors-value';
25 | export const KEY_TIFF_COMPRESSION_VALUE = 'resizem-' + version + '-tiff-compression-value';
26 | export const KEY_PNG_COMPRESSION_VALUE = 'resizem-' + version + '-png-compression-value';
27 | export const KEY_EXIF_ORIENTATION_VALUE = 'resizem-' + version + '-exif-orientation-value';
28 |
29 | //Keys for event
30 | export const EVENT_FILE_DROP = 'resizem-' + version + '-file-drop';
31 | export const EVENT_BEFORE_EXIT = 'resizem-' + version + '-before-exit';
32 | export const EVENT_FILE_RESULT = 'resizem-' + version + '-file-result';
33 | export const EVENT_START = 'resizem-' + version + '-start-jobs';
34 | export const EVENT_CANCEL = 'resizem-' + version + '-cancel-jobs';
35 | export const EVENT_CLEAR_HISTORY = 'resizem-' + version + '-clear-history';
36 | export const EVENT_BACKEND_ERROR = 'resizem-' + version + '_backend_error';
37 |
--------------------------------------------------------------------------------
/frontend/src/lib/app_stores.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2024 Barat Semet (https://github.com/barats)
2 | // Resizem is licensed under Mulan PSL v2.
3 | // You can use this software according to the terms and conditions of the Mulan PSL v2.
4 | // You may obtain a copy of Mulan PSL v2 at:
5 | // http://license.coscl.org.cn/MulanPSL2
6 | // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7 | // EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8 | // MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9 | // See the Mulan PSL v2 for more details.
10 |
11 | import { writable } from '@macfja/svelte-persistent-store';
12 | import {
13 | KEY_ASK_WHERE_TO_SAVE,
14 | KEY_CPU_VALUE,
15 | KEY_DOING,
16 | KEY_EXIF_ORIENTATION_VALUE,
17 | KEY_FILES_LIST,
18 | KEY_FILTER_VALUE,
19 | KEY_FORMAT_VALUE,
20 | KEY_GIF_COLORS_VALUE,
21 | KEY_HEIGHT_VALUE,
22 | KEY_JPEG_QUALITY_VALUE,
23 | KEY_PNG_COMPRESSION_VALUE,
24 | KEY_RESULT_LIST,
25 | KEY_TIFF_COMPRESSION_VALUE,
26 | KEY_WIDTH_VALUE
27 | } from './app_consts';
28 |
29 | export let doing = writable(KEY_DOING, false);
30 | export let askWheretoSave = writable(KEY_ASK_WHERE_TO_SAVE, false);
31 |
32 | export let filesList = writable(KEY_FILES_LIST, []);
33 | export let resultList = writable(KEY_RESULT_LIST, []);
34 |
35 | export let formatValue = writable(KEY_FORMAT_VALUE, 0); //Keep original format
36 | export let filterValue = writable(KEY_FILTER_VALUE, 1); // Lanczos
37 | export let widthValue = writable(KEY_WIDTH_VALUE);
38 | export let heightValue = writable(KEY_HEIGHT_VALUE);
39 |
40 | export let cpuUsageValue = writable(KEY_CPU_VALUE, 1);
41 | export let jpegQualityValue = writable(KEY_JPEG_QUALITY_VALUE, 75);
42 | export let gifColorsValue = writable(KEY_GIF_COLORS_VALUE, 256);
43 | export let tiffCompressionValue = writable(KEY_TIFF_COMPRESSION_VALUE, 0);
44 | export let pngCompressionValue = writable(KEY_PNG_COMPRESSION_VALUE, -1);
45 | export let autoExifOrientation = writable(KEY_EXIF_ORIENTATION_VALUE, false);
46 |
--------------------------------------------------------------------------------
/frontend/src/lib/i18n/index.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2024 Barat Semet (https://github.com/barats)
2 | // Resizem is licensed under Mulan PSL v2.
3 | // You can use this software according to the terms and conditions of the Mulan PSL v2.
4 | // You may obtain a copy of Mulan PSL v2 at:
5 | // http://license.coscl.org.cn/MulanPSL2
6 | // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7 | // EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8 | // MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9 | // See the Mulan PSL v2 for more details.
10 |
11 | import { browser } from '$app/environment';
12 | import { init, register, locale } from 'svelte-i18n';
13 |
14 | const locale_storage_key = 'user-locale';
15 |
16 | function getLocalStore(key) {
17 | if (browser) return localStorage.getItem(key);
18 | }
19 |
20 | function setLocalStore(key, value) {
21 | if (browser) localStorage.setItem(key, value);
22 | }
23 |
24 | let userLocale = getLocalStore(locale_storage_key) || 'en-US';
25 |
26 | export let appLocales = [
27 | { value: 'en-US', name: 'English' },
28 | { value: 'zh-CN', name: '简体中文' },
29 | { value: 'zh-TW', name: '繁體中文' }
30 | ];
31 |
32 | register('en-US', () => import('./locales/en_US.json'));
33 | register('zh-CN', () => import('./locales/zh_CN.json'));
34 | register('zh-TW', () => import('./locales/zh_TW.json'));
35 |
36 | init({
37 | fallbackLocale: userLocale,
38 | initialLocale: userLocale
39 | });
40 |
41 | export function setAppLocale(value) {
42 | setLocalStore(locale_storage_key, value);
43 | locale.set(value);
44 | }
45 |
46 | export function getAppLocale() {
47 | return getLocalStore(locale_storage_key) || 'en-US';
48 | }
49 |
--------------------------------------------------------------------------------
/frontend/src/lib/i18n/locales/en_US.json:
--------------------------------------------------------------------------------
1 | {
2 | "home": {
3 | "dropzone": {
4 | "message": "Click to Upload",
5 | "types": "BMP, PNG, JPG, JPEG, TIF, TIFF, WebP or GIF",
6 | "files_selected": "{count} file(s) selected"
7 | },
8 | "options": {
9 | "choose": "Choose options",
10 | "keep": "Keep Original Format",
11 | "format": "Format",
12 | "filter": "Filter",
13 | "width": {
14 | "title": "Width",
15 | "helper1": "Numbers only.",
16 | "helper2": "Non-digits and 0 will be ignored."
17 | },
18 | "height": {
19 | "title": "Height",
20 | "helper1": "Numbers only.",
21 | "helper2": "Non-digits and 0 will be ignored."
22 | }
23 | },
24 | "buttons": {
25 | "doing": "Converting",
26 | "cancel": "Cancel",
27 | "start": "Start",
28 | "clear": "Clear"
29 | }
30 | },
31 | "settings": {
32 | "language": {
33 | "title": "Language Options"
34 | },
35 | "cpu": {
36 | "title": "CPU & Memory Usage",
37 | "medium": "Medium",
38 | "high": "High",
39 | "most": "Most",
40 | "medium_desc": "Medium CPU & Memory cost, default process speed.",
41 | "high_desc": "High CPU & Memory cost, high process speed.",
42 | "most_desc": "Most CPU & Memory cost, faster process speed."
43 | },
44 | "path": {
45 | "title": "File Output Path",
46 | "ask_me_desc": "Output path will remain the same as the original file by default.",
47 | "ask_me": "Ask Before Process"
48 | },
49 | "image": {
50 | "title": "Image Settings",
51 | "jpg_title": "JPEG Quality",
52 | "jpg_desc": "Encoding parameter for JPG, JPEG images. Quality ranges from 1 to 100 inclusive, higher is better.",
53 | "jpg_cur_value": "Current Value: ",
54 | "gif_title": "GIF NumColors",
55 | "gif_desc": "Maximum number of colors used in the GIF encoded image. NumColors ranges from 1 to 256 inclusive, higher is better.",
56 | "gif_cur_value": "Current Value: ",
57 | "png_title": "PNG Compression",
58 | "png_desc": "Default Compression, No Compression, Best Speed, Best Compression",
59 | "tiff_title": "TIFF Compression",
60 | "tiff_desc": "Uncompressed, Deflate, LZW, CCITTGroup3, CCITTGroup4",
61 | "exit_auto_orientation": "Auto Orientation",
62 | "exif_orientation_title": "EXIF Orientation",
63 | "exif_orientation_desc": "If auto orientation is enabled, the image will be transformed after decoding according to the EXIF orientation tag (if present)."
64 | }
65 | },
66 | "about": {
67 | "title": "Resizem",
68 | "content": [
69 | "Disclaimer of Warranties",
70 | "
The software provided is on an \"as-is\" and \"as available\" basis. No warranties, express or implied, are made regarding the use or performance of the software. The user assumes all responsibility and risk for the use of the software. Resizem do not guarantee that the software will meet your requirements, be free from errors, or operate uninterrupted.
",
71 | "
Limitation of Liability
",
72 | "
In no event shall Resizem be liable for any direct, indirect, incidental, special, or consequential damages arising out of or related to the use or inability to use the software, including but not limited to, damages for loss of profits, business interruption, or loss of information, even if Resizem have been advised of the possibility of such damages.
",
73 | "
User Responsibility
",
74 | "
It is the user's responsibility to ensure that the software is compatible with their systems and meets their needs. Resizem shall not be responsible for any damage or data loss resulting from the use of the software.
",
75 | "
Updates and Modifications
",
76 | "
Resizem reserve the right to modify, update, or discontinue the software at any time without prior notice. Continued use of the software following any updates or modifications constitutes your acceptance of such changes.
",
77 | "
Third-Party Software
",
78 | "
This software may contain links or integrations to third-party software or services. Resizem are not responsible for the performance, privacy, or security of any third-party products or services.
",
79 | "
By using this software, you acknowledge that you have read and understood this disclaimer and agree to its terms.