├── .gitignore
├── LICENSE
├── MegaPixel-Qt
├── icon.ico
├── interface
│ ├── form.ui
│ └── main.pyproject
├── main.py
└── worker.py
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | MegaPixel-Qt/__pycache__/
2 | MegaPixel-Qt/interface/main.pyproject.user
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/MegaPixel-Qt/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alkl58/MegaPixel-Qt/ec47b1266da17a4add0c24def41541a7d28d3b0a/MegaPixel-Qt/icon.ico
--------------------------------------------------------------------------------
/MegaPixel-Qt/interface/form.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | megapixel
4 |
5 |
6 |
7 | 0
8 | 0
9 | 800
10 | 570
11 |
12 |
13 |
14 | megapixel
15 |
16 |
17 |
18 | ../icon.ico../icon.ico
19 |
20 |
21 |
22 |
23 | 10
24 | 10
25 | 101
26 | 51
27 |
28 |
29 |
30 | Open Source
31 |
32 |
33 |
34 |
35 |
36 | 210
37 | 10
38 | 101
39 | 51
40 |
41 |
42 |
43 | Start Encoding
44 |
45 |
46 |
47 |
48 |
49 | 10
50 | 90
51 | 771
52 | 431
53 |
54 |
55 |
56 | 0
57 |
58 |
59 |
60 | Queue
61 |
62 |
63 |
64 |
65 | 0
66 | 40
67 | 761
68 | 361
69 |
70 |
71 |
72 | false
73 |
74 |
75 | QAbstractItemView::DragDrop
76 |
77 |
78 | Qt::CopyAction
79 |
80 |
81 |
82 |
83 |
84 | 690
85 | 0
86 | 71
87 | 41
88 |
89 |
90 |
91 | Clear
92 |
93 |
94 |
95 |
96 |
97 | 577
98 | 0
99 | 111
100 | 41
101 |
102 |
103 |
104 | Remove Item(s)
105 |
106 |
107 |
108 |
109 |
110 | 10
111 | 0
112 | 421
113 | 41
114 |
115 |
116 |
117 |
118 | true
119 |
120 |
121 |
122 | Output: Please set the destination
123 |
124 |
125 |
126 |
127 |
128 | Settings
129 |
130 |
131 |
132 | false
133 |
134 |
135 |
136 | 0
137 | 336
138 | 761
139 | 71
140 |
141 |
142 |
143 |
144 |
145 |
146 | 0
147 | 300
148 | 141
149 | 26
150 |
151 |
152 |
153 | Custom Settings
154 |
155 |
156 |
157 |
158 |
159 | 0
160 | 0
161 | 761
162 | 261
163 |
164 |
165 |
166 | false
167 |
168 |
169 | AVIF Settings
170 |
171 |
172 | false
173 |
174 |
175 |
176 | true
177 |
178 |
179 |
180 | 330
181 | 140
182 | 61
183 | 36
184 |
185 |
186 |
187 | 6
188 |
189 |
190 |
191 |
192 | true
193 |
194 |
195 |
196 | 330
197 | 90
198 | 61
199 | 36
200 |
201 |
202 | -
203 |
204 | 420
205 |
206 |
207 | -
208 |
209 | 422
210 |
211 |
212 | -
213 |
214 | 444
215 |
216 |
217 |
218 |
219 |
220 | true
221 |
222 |
223 |
224 | 220
225 | 90
226 | 101
227 | 31
228 |
229 |
230 |
231 | Color Format:
232 |
233 |
234 |
235 |
236 | true
237 |
238 |
239 |
240 | 220
241 | 140
242 | 101
243 | 31
244 |
245 |
246 |
247 | Tile-Columns:
248 |
249 |
250 |
251 |
252 | true
253 |
254 |
255 |
256 | 20
257 | 90
258 | 67
259 | 31
260 |
261 |
262 |
263 | Depth:
264 |
265 |
266 |
267 |
268 | true
269 |
270 |
271 |
272 | 100
273 | 190
274 | 61
275 | 36
276 |
277 |
278 |
279 | 1
280 |
281 |
282 | 32
283 |
284 |
285 |
286 |
287 | true
288 |
289 |
290 |
291 | 490
292 | 90
293 | 81
294 | 36
295 |
296 |
297 | -
298 |
299 | full
300 |
301 |
302 | -
303 |
304 | limited
305 |
306 |
307 |
308 |
309 |
310 |
311 | 430
312 | 40
313 | 97
314 | 26
315 |
316 |
317 |
318 | Lossless
319 |
320 |
321 |
322 |
323 | true
324 |
325 |
326 |
327 | 220
328 | 190
329 | 67
330 | 31
331 |
332 |
333 |
334 | Speed:
335 |
336 |
337 |
338 |
339 | true
340 |
341 |
342 |
343 | 20
344 | 190
345 | 67
346 | 31
347 |
348 |
349 |
350 | Threads:
351 |
352 |
353 |
354 |
355 | true
356 |
357 |
358 |
359 | 330
360 | 40
361 | 61
362 | 36
363 |
364 |
365 |
366 | 63
367 |
368 |
369 | 20
370 |
371 |
372 |
373 |
374 |
375 | 430
376 | 90
377 | 51
378 | 31
379 |
380 |
381 |
382 | Range:
383 |
384 |
385 |
386 |
387 | true
388 |
389 |
390 |
391 | 100
392 | 90
393 | 61
394 | 36
395 |
396 |
397 | -
398 |
399 | 8
400 |
401 |
402 | -
403 |
404 | 10
405 |
406 |
407 | -
408 |
409 | 12
410 |
411 |
412 |
413 |
414 |
415 | true
416 |
417 |
418 |
419 | 100
420 | 40
421 | 61
422 | 36
423 |
424 |
425 |
426 | 63
427 |
428 |
429 |
430 |
431 | true
432 |
433 |
434 |
435 | 20
436 | 140
437 | 71
438 | 31
439 |
440 |
441 |
442 | Tile-Rows:
443 |
444 |
445 |
446 |
447 | true
448 |
449 |
450 |
451 | 220
452 | 40
453 | 67
454 | 31
455 |
456 |
457 |
458 | Max Q:
459 |
460 |
461 |
462 |
463 | true
464 |
465 |
466 |
467 | 330
468 | 190
469 | 61
470 | 36
471 |
472 |
473 |
474 | 0
475 |
476 |
477 | 10
478 |
479 |
480 | 8
481 |
482 |
483 |
484 |
485 | true
486 |
487 |
488 |
489 | 20
490 | 40
491 | 67
492 | 31
493 |
494 |
495 |
496 | Min Q:
497 |
498 |
499 |
500 |
501 | true
502 |
503 |
504 |
505 | 100
506 | 140
507 | 61
508 | 36
509 |
510 |
511 |
512 | 6
513 |
514 |
515 |
516 |
517 |
518 |
519 | 0
520 | 0
521 | 761
522 | 261
523 |
524 |
525 |
526 | false
527 |
528 |
529 | WEBP Settings
530 |
531 |
532 |
533 |
534 | 110
535 | 40
536 | 61
537 | 36
538 |
539 |
540 |
541 | 100
542 |
543 |
544 | 75
545 |
546 |
547 |
548 |
549 | true
550 |
551 |
552 |
553 | 20
554 | 90
555 | 67
556 | 31
557 |
558 |
559 |
560 | Preset:
561 |
562 |
563 |
564 |
565 |
566 | 110
567 | 90
568 | 101
569 | 36
570 |
571 |
572 | -
573 |
574 | default
575 |
576 |
577 | -
578 |
579 | photo
580 |
581 |
582 | -
583 |
584 | picture
585 |
586 |
587 | -
588 |
589 | drawing
590 |
591 |
592 | -
593 |
594 | icon
595 |
596 |
597 | -
598 |
599 | text
600 |
601 |
602 |
603 |
604 |
605 |
606 | 550
607 | 40
608 | 97
609 | 31
610 |
611 |
612 |
613 | Lossless:
614 |
615 |
616 |
617 |
618 | false
619 |
620 |
621 |
622 | 650
623 | 40
624 | 101
625 | 36
626 |
627 |
628 |
629 | 5
630 |
631 | -
632 |
633 | 0 - fastest
634 |
635 |
636 | -
637 |
638 | 1
639 |
640 |
641 | -
642 |
643 | 2
644 |
645 |
646 | -
647 |
648 | 3
649 |
650 |
651 | -
652 |
653 | 4
654 |
655 |
656 | -
657 |
658 | 5
659 |
660 |
661 | -
662 |
663 | 6
664 |
665 |
666 | -
667 |
668 | 7
669 |
670 |
671 | -
672 |
673 | 8
674 |
675 |
676 | -
677 |
678 | 9 - slowest
679 |
680 |
681 |
682 |
683 |
684 | true
685 |
686 |
687 |
688 | 20
689 | 140
690 | 67
691 | 31
692 |
693 |
694 |
695 | Speed:
696 |
697 |
698 |
699 |
700 |
701 | 110
702 | 140
703 | 101
704 | 36
705 |
706 |
707 |
708 | 4
709 |
710 | -
711 |
712 | 0 - fastest
713 |
714 |
715 | -
716 |
717 | 1
718 |
719 |
720 | -
721 |
722 | 2
723 |
724 |
725 | -
726 |
727 | 3
728 |
729 |
730 | -
731 |
732 | 4
733 |
734 |
735 | -
736 |
737 | 5
738 |
739 |
740 | -
741 |
742 | 6 - slowest
743 |
744 |
745 |
746 |
747 |
748 | true
749 |
750 |
751 |
752 | 20
753 | 190
754 | 81
755 | 31
756 |
757 |
758 |
759 | Segments:
760 |
761 |
762 |
763 |
764 |
765 | 110
766 | 190
767 | 61
768 | 36
769 |
770 |
771 |
772 | 1
773 |
774 |
775 | 4
776 |
777 |
778 | 4
779 |
780 |
781 |
782 |
783 |
784 | 20
785 | 40
786 | 97
787 | 31
788 |
789 |
790 |
791 | Quality:
792 |
793 |
794 | true
795 |
796 |
797 |
798 |
799 |
800 | 200
801 | 40
802 | 121
803 | 31
804 |
805 |
806 |
807 | Size (kb):
808 |
809 |
810 |
811 |
812 | false
813 |
814 |
815 |
816 | 300
817 | 40
818 | 91
819 | 36
820 |
821 |
822 |
823 | 1
824 |
825 |
826 | 100000
827 |
828 |
829 | 100
830 |
831 |
832 | 1000
833 |
834 |
835 |
836 |
837 |
838 | 410
839 | 40
840 | 121
841 | 31
842 |
843 |
844 |
845 | PSNR:
846 |
847 |
848 |
849 |
850 | false
851 |
852 |
853 |
854 | 480
855 | 40
856 | 55
857 | 36
858 |
859 |
860 |
861 | 1
862 |
863 |
864 | 63
865 |
866 |
867 | 42
868 |
869 |
870 |
871 |
872 |
873 | 240
874 | 90
875 | 161
876 | 31
877 |
878 |
879 |
880 | Spatial noise shaping:
881 |
882 |
883 |
884 |
885 |
886 | 410
887 | 90
888 | 61
889 | 36
890 |
891 |
892 |
893 | (0:off, 100:max), default=50
894 |
895 |
896 | 100
897 |
898 |
899 | 50
900 |
901 |
902 |
903 |
904 |
905 | 240
906 | 140
907 | 161
908 | 31
909 |
910 |
911 |
912 | Filter strength:
913 |
914 |
915 |
916 |
917 |
918 | 410
919 | 140
920 | 61
921 | 36
922 |
923 |
924 |
925 | (0=off..100), default=60
926 |
927 |
928 | 100
929 |
930 |
931 | 60
932 |
933 |
934 |
935 |
936 |
937 | 240
938 | 190
939 | 161
940 | 31
941 |
942 |
943 |
944 | Filter Sharpness:
945 |
946 |
947 |
948 |
949 |
950 | 410
951 | 190
952 | 61
953 | 36
954 |
955 |
956 |
957 | (0:most .. 7:least sharp), default=0
958 |
959 |
960 | 7
961 |
962 |
963 |
964 |
965 |
966 | 550
967 | 90
968 | 141
969 | 26
970 |
971 |
972 |
973 | Multi Threading
974 |
975 |
976 |
977 |
978 |
979 |
980 | 0
981 | 0
982 | 761
983 | 261
984 |
985 |
986 |
987 | false
988 |
989 |
990 | 100 = mathematically lossless. Default for already-lossy input (JPEG/GIF).
991 |
992 |
993 | JPEGXL Settings
994 |
995 |
996 |
997 |
998 | 110
999 | 40
1000 | 61
1001 | 36
1002 |
1003 |
1004 |
1005 | 100
1006 |
1007 |
1008 | 85
1009 |
1010 |
1011 |
1012 |
1013 |
1014 | 20
1015 | 90
1016 | 97
1017 | 31
1018 |
1019 |
1020 |
1021 | Speed:
1022 |
1023 |
1024 |
1025 |
1026 |
1027 | 110
1028 | 90
1029 | 121
1030 | 36
1031 |
1032 |
1033 |
1034 | 4
1035 |
1036 | -
1037 |
1038 | 3 - falcon
1039 |
1040 |
1041 | -
1042 |
1043 | 4 - cheetah
1044 |
1045 |
1046 | -
1047 |
1048 | 5 - hare
1049 |
1050 |
1051 | -
1052 |
1053 | 6 - wombat
1054 |
1055 |
1056 | -
1057 |
1058 | 7 - squirrel
1059 |
1060 |
1061 | -
1062 |
1063 | 8 - kitten
1064 |
1065 |
1066 | -
1067 |
1068 | 9 - tortoise
1069 |
1070 |
1071 |
1072 |
1073 |
1074 |
1075 | 20
1076 | 40
1077 | 97
1078 | 31
1079 |
1080 |
1081 |
1082 | Quality:
1083 |
1084 |
1085 | true
1086 |
1087 |
1088 |
1089 |
1090 | true
1091 |
1092 |
1093 |
1094 | 190
1095 | 40
1096 | 97
1097 | 31
1098 |
1099 |
1100 |
1101 | Size (kb):
1102 |
1103 |
1104 | false
1105 |
1106 |
1107 |
1108 |
1109 | false
1110 |
1111 |
1112 |
1113 | 290
1114 | 40
1115 | 81
1116 | 36
1117 |
1118 |
1119 |
1120 | 1
1121 |
1122 |
1123 | 100000
1124 |
1125 |
1126 | 100
1127 |
1128 |
1129 | 1000
1130 |
1131 |
1132 |
1133 |
1134 |
1135 | 20
1136 | 10
1137 | 97
1138 | 26
1139 |
1140 |
1141 |
1142 | Encode
1143 |
1144 |
1145 | true
1146 |
1147 |
1148 |
1149 |
1150 | true
1151 |
1152 |
1153 |
1154 | 20
1155 | 140
1156 | 97
1157 | 26
1158 |
1159 |
1160 |
1161 | Decode
1162 |
1163 |
1164 | false
1165 |
1166 |
1167 |
1168 |
1169 | false
1170 |
1171 |
1172 |
1173 | 20
1174 | 170
1175 | 67
1176 | 31
1177 |
1178 |
1179 |
1180 | Format:
1181 |
1182 |
1183 |
1184 |
1185 | false
1186 |
1187 |
1188 |
1189 | 110
1190 | 170
1191 | 94
1192 | 36
1193 |
1194 |
1195 | -
1196 |
1197 | png
1198 |
1199 |
1200 | -
1201 |
1202 | jpg
1203 |
1204 |
1205 | -
1206 |
1207 | ppm
1208 |
1209 |
1210 | -
1211 |
1212 | pfm
1213 |
1214 |
1215 |
1216 |
1217 |
1218 | false
1219 |
1220 |
1221 |
1222 | 220
1223 | 170
1224 | 97
1225 | 31
1226 |
1227 |
1228 |
1229 | Use sjpeg
1230 |
1231 |
1232 |
1233 |
1234 | false
1235 |
1236 |
1237 |
1238 | 20
1239 | 210
1240 | 67
1241 | 31
1242 |
1243 |
1244 |
1245 | Quality:
1246 |
1247 |
1248 |
1249 |
1250 |
1251 | 110
1252 | 210
1253 | 61
1254 | 36
1255 |
1256 |
1257 |
1258 | 1
1259 |
1260 |
1261 | 100
1262 |
1263 |
1264 | 1
1265 |
1266 |
1267 | 100
1268 |
1269 |
1270 |
1271 |
1272 |
1273 |
1274 | 0
1275 | 0
1276 | 761
1277 | 301
1278 |
1279 |
1280 |
1281 | Tune trellis optimization - Default: PSNR-HVS
1282 |
1283 |
1284 | MOZJPEG Settings
1285 |
1286 |
1287 |
1288 |
1289 | 20
1290 | 40
1291 | 58
1292 | 31
1293 |
1294 |
1295 |
1296 | Quality:
1297 |
1298 |
1299 |
1300 |
1301 |
1302 | 80
1303 | 40
1304 | 75
1305 | 32
1306 |
1307 |
1308 |
1309 | Compression quality (0..100; 5-95 is most useful range, default is 75)
1310 |
1311 |
1312 | 100
1313 |
1314 |
1315 | 75
1316 |
1317 |
1318 |
1319 |
1320 |
1321 | 20
1322 | 90
1323 | 58
1324 | 31
1325 |
1326 |
1327 |
1328 | Tune:
1329 |
1330 |
1331 |
1332 |
1333 |
1334 | 80
1335 | 90
1336 | 87
1337 | 32
1338 |
1339 |
1340 |
1341 | 1
1342 |
1343 | -
1344 |
1345 | psnr
1346 |
1347 |
1348 | -
1349 |
1350 | hvs-psnr
1351 |
1352 |
1353 | -
1354 |
1355 | ssim
1356 |
1357 |
1358 | -
1359 |
1360 | ms-ssim
1361 |
1362 |
1363 |
1364 |
1365 |
1366 |
1367 |
1368 | Program
1369 |
1370 |
1371 |
1372 |
1373 | 20
1374 | 10
1375 | 191
1376 | 22
1377 |
1378 |
1379 |
1380 | Version: 0.4 Pre-Release
1381 |
1382 |
1383 |
1384 |
1385 |
1386 | 20
1387 | 40
1388 | 341
1389 | 22
1390 |
1391 |
1392 |
1393 | Github: https://github.com/Alkl58/MegaPixel-Qt
1394 |
1395 |
1396 |
1397 |
1398 |
1399 | 0
1400 | 230
1401 | 761
1402 | 171
1403 |
1404 |
1405 |
1406 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
1407 | <html><head><meta name="qrichtext" content="1" /><style type="text/css">
1408 | p, li { white-space: pre-wrap; }
1409 | </style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;">
1410 | <p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qt is available under the GNU Lesser General Public License version 3.</p>
1411 | <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Qt Toolkit is Copyright (C) 2018 The Qt Company Ltd. and other contributors.</p>
1412 | <p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> GNU LESSER GENERAL PUBLIC LICENSE</span></p>
1413 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Version 3, 29 June 2007</span></p>
1414 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1415 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/></span></p>
1416 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Everyone is permitted to copy and distribute verbatim copies</span></p>
1417 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> of this license document, but changing it is not allowed.</span></p>
1418 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1419 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> This version of the GNU Lesser General Public License incorporates</span></p>
1420 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">the terms and conditions of version 3 of the GNU General Public</span></p>
1421 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">License, supplemented by the additional permissions listed below.</span></p>
1422 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1423 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> 0. Additional Definitions.</span></p>
1424 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1425 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> As used herein, "this License" refers to version 3 of the GNU Lesser</span></p>
1426 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">General Public License, and the "GNU GPL" refers to version 3 of the GNU</span></p>
1427 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">General Public License.</span></p>
1428 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1429 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> "The Library" refers to a covered work governed by this License,</span></p>
1430 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">other than an Application or a Combined Work as defined below.</span></p>
1431 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1432 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> An "Application" is any work that makes use of an interface provided</span></p>
1433 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">by the Library, but which is not otherwise based on the Library.</span></p>
1434 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">Defining a subclass of a class defined by the Library is deemed a mode</span></p>
1435 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">of using an interface provided by the Library.</span></p>
1436 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1437 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> A "Combined Work" is a work produced by combining or linking an</span></p>
1438 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">Application with the Library. The particular version of the Library</span></p>
1439 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">with which the Combined Work was made is also called the "Linked</span></p>
1440 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">Version".</span></p>
1441 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1442 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> The "Minimal Corresponding Source" for a Combined Work means the</span></p>
1443 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">Corresponding Source for the Combined Work, excluding any source code</span></p>
1444 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">for portions of the Combined Work that, considered in isolation, are</span></p>
1445 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">based on the Application, and not on the Linked Version.</span></p>
1446 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1447 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> The "Corresponding Application Code" for a Combined Work means the</span></p>
1448 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">object code and/or source code for the Application, including any data</span></p>
1449 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">and utility programs needed for reproducing the Combined Work from the</span></p>
1450 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">Application, but excluding the System Libraries of the Combined Work.</span></p>
1451 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1452 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> 1. Exception to Section 3 of the GNU GPL.</span></p>
1453 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1454 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> You may convey a covered work under sections 3 and 4 of this License</span></p>
1455 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">without being bound by section 3 of the GNU GPL.</span></p>
1456 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1457 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> 2. Conveying Modified Versions.</span></p>
1458 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1459 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> If you modify a copy of the Library, and, in your modifications, a</span></p>
1460 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">facility refers to a function or data to be supplied by an Application</span></p>
1461 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">that uses the facility (other than as an argument passed when the</span></p>
1462 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">facility is invoked), then you may convey a copy of the modified</span></p>
1463 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">version:</span></p>
1464 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1465 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> a) under this License, provided that you make a good faith effort to</span></p>
1466 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> ensure that, in the event an Application does not supply the</span></p>
1467 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> function or data, the facility still operates, and performs</span></p>
1468 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> whatever part of its purpose remains meaningful, or</span></p>
1469 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1470 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> b) under the GNU GPL, with none of the additional permissions of</span></p>
1471 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> this License applicable to that copy.</span></p>
1472 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1473 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> 3. Object Code Incorporating Material from Library Header Files.</span></p>
1474 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1475 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> The object code form of an Application may incorporate material from</span></p>
1476 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">a header file that is part of the Library. You may convey such object</span></p>
1477 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">code under terms of your choice, provided that, if the incorporated</span></p>
1478 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">material is not limited to numerical parameters, data structure</span></p>
1479 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">layouts and accessors, or small macros, inline functions and templates</span></p>
1480 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">(ten or fewer lines in length), you do both of the following:</span></p>
1481 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1482 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> a) Give prominent notice with each copy of the object code that the</span></p>
1483 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Library is used in it and that the Library and its use are</span></p>
1484 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> covered by this License.</span></p>
1485 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1486 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> b) Accompany the object code with a copy of the GNU GPL and this license</span></p>
1487 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> document.</span></p>
1488 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1489 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> 4. Combined Works.</span></p>
1490 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1491 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> You may convey a Combined Work under terms of your choice that,</span></p>
1492 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">taken together, effectively do not restrict modification of the</span></p>
1493 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">portions of the Library contained in the Combined Work and reverse</span></p>
1494 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">engineering for debugging such modifications, if you also do each of</span></p>
1495 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">the following:</span></p>
1496 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1497 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> a) Give prominent notice with each copy of the Combined Work that</span></p>
1498 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> the Library is used in it and that the Library and its use are</span></p>
1499 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> covered by this License.</span></p>
1500 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1501 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> b) Accompany the Combined Work with a copy of the GNU GPL and this license</span></p>
1502 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> document.</span></p>
1503 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1504 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> c) For a Combined Work that displays copyright notices during</span></p>
1505 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> execution, include the copyright notice for the Library among</span></p>
1506 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> these notices, as well as a reference directing the user to the</span></p>
1507 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> copies of the GNU GPL and this license document.</span></p>
1508 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1509 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> d) Do one of the following:</span></p>
1510 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1511 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> 0) Convey the Minimal Corresponding Source under the terms of this</span></p>
1512 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> License, and the Corresponding Application Code in a form</span></p>
1513 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> suitable for, and under terms that permit, the user to</span></p>
1514 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> recombine or relink the Application with a modified version of</span></p>
1515 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> the Linked Version to produce a modified Combined Work, in the</span></p>
1516 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> manner specified by section 6 of the GNU GPL for conveying</span></p>
1517 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Corresponding Source.</span></p>
1518 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1519 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> 1) Use a suitable shared library mechanism for linking with the</span></p>
1520 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Library. A suitable mechanism is one that (a) uses at run time</span></p>
1521 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> a copy of the Library already present on the user's computer</span></p>
1522 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> system, and (b) will operate properly with a modified version</span></p>
1523 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> of the Library that is interface-compatible with the Linked</span></p>
1524 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Version.</span></p>
1525 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1526 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> e) Provide Installation Information, but only if you would otherwise</span></p>
1527 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> be required to provide such information under section 6 of the</span></p>
1528 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> GNU GPL, and only to the extent that such information is</span></p>
1529 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> necessary to install and execute a modified version of the</span></p>
1530 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Combined Work produced by recombining or relinking the</span></p>
1531 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Application with a modified version of the Linked Version. (If</span></p>
1532 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> you use option 4d0, the Installation Information must accompany</span></p>
1533 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> the Minimal Corresponding Source and Corresponding Application</span></p>
1534 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Code. If you use option 4d1, you must provide the Installation</span></p>
1535 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Information in the manner specified by section 6 of the GNU GPL</span></p>
1536 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> for conveying Corresponding Source.)</span></p>
1537 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1538 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> 5. Combined Libraries.</span></p>
1539 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1540 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> You may place library facilities that are a work based on the</span></p>
1541 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">Library side by side in a single library together with other library</span></p>
1542 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">facilities that are not Applications and are not covered by this</span></p>
1543 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">License, and convey such a combined library under terms of your</span></p>
1544 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">choice, if you do both of the following:</span></p>
1545 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1546 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> a) Accompany the combined library with a copy of the same work based</span></p>
1547 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> on the Library, uncombined with any other library facilities,</span></p>
1548 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> conveyed under the terms of this License.</span></p>
1549 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1550 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> b) Give prominent notice with the combined library that part of it</span></p>
1551 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> is a work based on the Library, and explaining where to find the</span></p>
1552 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> accompanying uncombined form of the same work.</span></p>
1553 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1554 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> 6. Revised Versions of the GNU Lesser General Public License.</span></p>
1555 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1556 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> The Free Software Foundation may publish revised and/or new versions</span></p>
1557 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">of the GNU Lesser General Public License from time to time. Such new</span></p>
1558 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">versions will be similar in spirit to the present version, but may</span></p>
1559 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">differ in detail to address new problems or concerns.</span></p>
1560 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1561 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> Each version is given a distinguishing version number. If the</span></p>
1562 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">Library as you received it specifies that a certain numbered version</span></p>
1563 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">of the GNU Lesser General Public License "or any later version"</span></p>
1564 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">applies to it, you have the option of following the terms and</span></p>
1565 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">conditions either of that published version or of any later version</span></p>
1566 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">published by the Free Software Foundation. If the Library as you</span></p>
1567 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">received it does not specify a version number of the GNU Lesser</span></p>
1568 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">General Public License, you may choose any version of the GNU Lesser</span></p>
1569 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">General Public License ever published by the Free Software Foundation.</span></p>
1570 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Mono';"><br /></p>
1571 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';"> If the Library as you received it specifies that a proxy can decide</span></p>
1572 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">whether future versions of the GNU Lesser General Public License shall</span></p>
1573 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">apply, that proxy's public statement of acceptance of any version is</span></p>
1574 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">permanent authorization for you to choose that version for the</span></p>
1575 | <p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono';">Library.</span></p></body></html>
1576 |
1577 |
1578 |
1579 |
1580 |
1581 | 0
1582 | 200
1583 | 381
1584 | 22
1585 |
1586 |
1587 |
1588 | License: https://doc.qt.io/qt-5/lgpl.html
1589 |
1590 |
1591 |
1592 |
1593 |
1594 | 20
1595 | 70
1596 | 251
1597 | 26
1598 |
1599 |
1600 |
1601 | Include Subfolders in Batch Mode
1602 |
1603 |
1604 | true
1605 |
1606 |
1607 |
1608 |
1609 |
1610 | 20
1611 | 100
1612 | 231
1613 | 17
1614 |
1615 |
1616 |
1617 | Clear Queue after Completion
1618 |
1619 |
1620 |
1621 |
1622 |
1623 |
1624 |
1625 | 110
1626 | 10
1627 | 101
1628 | 51
1629 |
1630 |
1631 |
1632 | Save to...
1633 |
1634 |
1635 |
1636 |
1637 |
1638 | 10
1639 | 60
1640 | 181
1641 | 26
1642 |
1643 |
1644 |
1645 | Batch Add Pictures
1646 |
1647 |
1648 |
1649 |
1650 |
1651 | 10
1652 | 530
1653 | 771
1654 | 24
1655 |
1656 |
1657 |
1658 | 0
1659 |
1660 |
1661 |
1662 |
1663 |
1664 | 380
1665 | 20
1666 | 111
1667 | 31
1668 |
1669 |
1670 | -
1671 |
1672 | avif
1673 |
1674 |
1675 | -
1676 |
1677 | webp
1678 |
1679 |
1680 | -
1681 |
1682 | jpegxl
1683 |
1684 |
1685 | -
1686 |
1687 | mozjpeg
1688 |
1689 |
1690 |
1691 |
1692 |
1693 |
1694 | 330
1695 | 20
1696 | 91
1697 | 31
1698 |
1699 |
1700 |
1701 | Encoder:
1702 |
1703 |
1704 |
1705 |
1706 |
1707 | 510
1708 | 20
1709 | 121
1710 | 31
1711 |
1712 |
1713 |
1714 | Parallel Workers:
1715 |
1716 |
1717 |
1718 |
1719 |
1720 | 620
1721 | 20
1722 | 81
1723 | 31
1724 |
1725 |
1726 |
1727 | 1
1728 |
1729 |
1730 | 128
1731 |
1732 |
1733 |
1734 |
1735 |
1736 | 710
1737 | 60
1738 | 61
1739 | 31
1740 |
1741 |
1742 |
1743 | Save
1744 |
1745 |
1746 |
1747 |
1748 |
1749 | 560
1750 | 60
1751 | 51
1752 | 31
1753 |
1754 |
1755 |
1756 | Delete
1757 |
1758 |
1759 |
1760 |
1761 |
1762 | 330
1763 | 60
1764 | 51
1765 | 31
1766 |
1767 |
1768 |
1769 | Preset:
1770 |
1771 |
1772 |
1773 |
1774 |
1775 | 620
1776 | 60
1777 | 81
1778 | 31
1779 |
1780 |
1781 |
1782 | PresetName
1783 |
1784 |
1785 | Qt::AlignCenter
1786 |
1787 |
1788 |
1789 |
1790 |
1791 | 500
1792 | 60
1793 | 51
1794 | 31
1795 |
1796 |
1797 |
1798 | Load
1799 |
1800 |
1801 |
1802 |
1803 |
1804 | 380
1805 | 60
1806 | 111
1807 | 31
1808 |
1809 |
1810 |
1811 |
1812 |
1813 |
1814 |
1815 |
--------------------------------------------------------------------------------
/MegaPixel-Qt/interface/main.pyproject:
--------------------------------------------------------------------------------
1 | {
2 | "files": ["form.ui"]
3 | }
4 |
--------------------------------------------------------------------------------
/MegaPixel-Qt/main.py:
--------------------------------------------------------------------------------
1 | # This Python file uses the following encoding: utf-8
2 |
3 | import os
4 | import sys
5 | import time
6 | import subprocess
7 | import platform
8 | import psutil
9 | import json
10 | import glob
11 |
12 | from PyQt5 import QtWidgets, uic, QtCore
13 | from PyQt5.QtWidgets import QFileDialog, QMessageBox
14 | from PyQt5.QtCore import QThread
15 | from multiprocessing.dummy import Pool
16 | from functools import partial
17 | from subprocess import call
18 | from os import path
19 | from pathlib import Path
20 |
21 | import worker
22 |
23 |
24 | class megapixel(QtWidgets.QMainWindow):
25 |
26 | image_output = None
27 | output_set = False
28 | tempInput = None
29 | avifParams = None
30 | webpParams = None
31 | cjxlParams = None
32 | djxlParams = None
33 | mozjParams = None
34 |
35 | def __init__(self):
36 |
37 | super(megapixel, self).__init__()
38 | pth = os.path.join(os.path.dirname(__file__), "interface", "form.ui") # Set path ui
39 | uic.loadUi(pth, self) # Load the .ui file
40 | self.setFixedWidth(800) # Set Window Width
41 | self.setFixedHeight(570) # Set Window Height
42 | self.setWindowTitle("MegaPixel-Qt") # Set Window Title
43 | self.pushButtonStart.clicked.connect(self.start_encoding)
44 | self.pushButtonOpenSource.clicked.connect(self.open_image_source)
45 | self.pushButtonSaveTo.clicked.connect(self.set_destination)
46 | self.pushButtonClearQueue.clicked.connect(self.ClearQueue)
47 | self.pushButtonRemoveQueue.clicked.connect(self.RemoveFromQueue)
48 | self.comboBoxEncoders.currentIndexChanged.connect(self.ToggleUiElems)
49 | self.checkBoxCustomSettings.stateChanged.connect(self.ToggleCustomSettings)
50 | self.spinBoxParallelWorkers.setValue(psutil.cpu_count(logical = False))
51 |
52 | # Preset
53 | self.pushButtonSavePreset.clicked.connect(self.savePreset)
54 |
55 | # Avif
56 | self.checkBoxAvifLossless.stateChanged.connect(self.ToggleAvifLossless)
57 |
58 | # Webp
59 | self.checkBoxWebpQuality.stateChanged.connect(self.ToggleWebpQuality)
60 | self.checkBoxWebpSize.stateChanged.connect(self.ToggleWebpSize)
61 | self.checkBoxWebpPSNR.stateChanged.connect(self.ToggleWebpPSNR)
62 | self.checkBoxWebpLossless.stateChanged.connect(self.ToggleWebpLossless)
63 |
64 | # Jpegxl
65 | self.checkBoxJpegXlQ.stateChanged.connect(self.ToggleJpegXlQ)
66 | self.checkBoxJpegXlSize.stateChanged.connect(self.ToggleJpegXlSize)
67 | self.checkBoxJpegXlEncode.stateChanged.connect(self.ToggleJpegXlEncode)
68 | self.checkBoxJpegXlDecode.stateChanged.connect(self.ToggleJpegXlDecode)
69 | self.comboBoxJpegXlDecodeFormat.currentIndexChanged.connect(self.ToggleJpegXlDecodeSettings)
70 |
71 | # UI Toggle
72 | self.checkBoxJpegXlDecodesjpeg.hide()
73 | self.labelJpegXlDecodeQuality.hide()
74 | self.spinBoxJpegXlDecodeQ.hide()
75 | self.groupBoxAvif.show()
76 | self.groupBoxWebp.hide()
77 | self.groupBoxJpegXl.hide()
78 | self.groupBoxMozjpeg.hide()
79 |
80 | # Drag & Drop
81 | self.listWidgetQueue.setAcceptDrops(True)
82 | self.listWidgetQueue.viewport().installEventFilter(self)
83 | types = ['text/uri-list']
84 | types.extend(self.listWidgetQueue.mimeTypes())
85 | self.listWidgetQueue.mimeTypes = lambda: types
86 |
87 | self.load_preset_startup()
88 | self.pushButtonLoadPreset.clicked.connect(self.load_preset)
89 | self.pushButtonDeletePreset.clicked.connect(self.delete_preset)
90 |
91 | # Show the GUI
92 | self.show()
93 |
94 | # ═══════════════════════════════════════ UI Logic ═══════════════════════════════════════
95 |
96 | def delete_preset(self):
97 | if os.path.isfile(os.path.join('Preset', self.comboBoxPreset.currentText() + '.json')):
98 | os.remove(os.path.join('Preset', self.comboBoxPreset.currentText() + '.json'))
99 | self.comboBoxPreset.clear()
100 | self.load_preset_startup()
101 |
102 | def load_preset_startup(self):
103 | for file_name in glob.iglob(os.path.join('Preset', '*.json'), recursive=True):
104 | self.comboBoxPreset.addItem(os.path.splitext(os.path.basename(file_name))[0])
105 |
106 | def load_preset(self):
107 | if os.path.isfile(os.path.join('Preset', self.comboBoxPreset.currentText() + '.json')):
108 | with open(os.path.join('Preset', self.comboBoxPreset.currentText() + '.json')) as json_file:
109 | data = json.load(json_file)
110 | for p in data['settings']:
111 | self.comboBoxEncoders.setCurrentIndex(p['encoder'])
112 | self.spinBoxParallelWorkers.setValue(p['workers'])
113 | self.checkBoxCustomSettings.setChecked(p['custom'])
114 | self.checkBoxClearQueue.setChecked(p['clearqueue'])
115 | self.textEditCustomSettings.setPlainText(p['customString'])
116 | self.spinBoxAvifMinQ.setValue(p['avifMinQ'])
117 | self.spinBoxAvifMaxQ.setValue(p['avifMaxQ'])
118 | self.checkBoxAvifLossless.setChecked(p['avifLossless'])
119 | self.comboBoxAvifDepth.setCurrentIndex(p['avifDepth'])
120 | self.comboBoxAvifColorFormat.setCurrentIndex(p['avifFmt'])
121 | self.comboBoxAvifRange.setCurrentIndex(p['avifRange'])
122 | self.spinBoxAvifTileRows.setValue(p['avifRows'])
123 | self.spinBoxAvifTileCols.setValue(p['avifCols'])
124 | self.spinBoxAvifThreads.setValue(p['avifThreads'])
125 | self.spinBoxAvifSpeed.setValue(p['avifSpeed'])
126 | self.checkBoxWebpQuality.setChecked(p['webpQActive'])
127 | self.checkBoxWebpSize.setChecked(p['webpSizeActive'])
128 | self.checkBoxWebpPSNR.setChecked(p['webpPSNRActive'])
129 | self.checkBoxWebpLossless.setChecked(p['webpLosslessActive'])
130 | self.spinBoxWebpQ.setValue(p['webpQ'])
131 | self.spinBoxWebpSize.setValue(p['webpSize'])
132 | self.spinBoxWebpPSNR.setValue(p['webpPSNR'])
133 | self.comboBoxWebpLossless.setCurrentIndex(p['webpLossless'])
134 | self.comboBoxWebpPreset.setCurrentIndex(p['webpPreset'])
135 | self.spinBoxWebNoiseShaping.setValue(p['webpNoiseShaping'])
136 | self.checkBoxWebpMultiThreading.setChecked(p['webpMT'])
137 | self.comboBoxWebpSpeed.setCurrentIndex(p['webpSpeed'])
138 | self.spinBoxWebFilterStrength.setValue(p['webpFilterStrength'])
139 | self.spinBoxWebpSegments.setValue(p['webpSegments'])
140 | self.spinBoxWebpFilterSharpness.setValue(p['webpFilterSharpness'])
141 | self.checkBoxJpegXlEncode.setChecked(p['jpegxlEncode'])
142 | self.checkBoxJpegXlDecode.setChecked(p['jpegxlDecode'])
143 | self.checkBoxJpegXlDecode.setChecked(p['jpegxlDecode'])
144 | self.checkBoxJpegXlQ.setChecked(p['jpegxlEncodeQActive'])
145 | self.checkBoxJpegXlSize.setChecked(p['jpegxlEncodeSizeActive'])
146 | self.checkBoxJpegXlDecodesjpeg.setChecked(p['jpegxlDecodeSjpeg'])
147 | self.spinBoxJpegXlQ.setValue(int(p['jpegxlEncodeQ']))
148 | self.spinBoxJpegXlSize.setValue(int(p['jpegxlEncodeSize']))
149 | self.comboBoxJpegXlSpeed.setCurrentIndex(p['jpegxlEncodeSpeed'])
150 | self.comboBoxJpegXlDecodeFormat.setCurrentIndex(p['jpegxlDecodeFormat'])
151 | self.spinBoxJpegXlDecodeQ.setValue(int(p['jpegxlDecodeQ']))
152 | self.spinBoxMozjpegQ.setValue(int(p['mozjpegQ']))
153 | self.comboBoxMozjpegTune.setCurrentIndex(p['mozjpegTune'])
154 |
155 | def savePreset(self):
156 | save_data = {}
157 | save_data['settings'] = []
158 | save_data['settings'].append({
159 | 'encoder': self.comboBoxEncoders.currentIndex(),
160 | 'workers': self.spinBoxParallelWorkers.value(),
161 | 'clearqueue': self.checkBoxClearQueue.isChecked(),
162 | 'custom': self.checkBoxCustomSettings.isChecked(),
163 | 'customString': self.textEditCustomSettings.toPlainText(),
164 | 'avifMinQ': self.spinBoxAvifMinQ.value(),
165 | 'avifMaxQ': self.spinBoxAvifMaxQ.value(),
166 | 'avifLossless': self.checkBoxAvifLossless.isChecked(),
167 | 'avifDepth': self.comboBoxAvifDepth.currentIndex(),
168 | 'avifFmt': self.comboBoxAvifColorFormat.currentIndex(),
169 | 'avifRange': self.comboBoxAvifRange.currentIndex(),
170 | 'avifRows': self.spinBoxAvifTileRows.value(),
171 | 'avifCols': self.spinBoxAvifTileCols.value(),
172 | 'avifThreads': self.spinBoxAvifThreads.value(),
173 | 'avifSpeed': self.spinBoxAvifSpeed.value(),
174 | 'webpQActive': self.checkBoxWebpQuality.isChecked(),
175 | 'webpQ': self.spinBoxWebpQ.value(),
176 | 'webpSizeActive': self.checkBoxWebpSize.isChecked(),
177 | 'webpSize': self.spinBoxWebpSize.value(),
178 | 'webpPSNRActive': self.checkBoxWebpPSNR.isChecked(),
179 | 'webpPSNR': self.spinBoxWebpPSNR.value(),
180 | 'webpLosslessActive': self.checkBoxWebpLossless.isChecked(),
181 | 'webpLossless': self.comboBoxWebpLossless.currentIndex(),
182 | 'webpPreset': self.comboBoxWebpPreset.currentIndex(),
183 | 'webpNoiseShaping': self.spinBoxWebNoiseShaping.value(),
184 | 'webpMT': self.checkBoxWebpMultiThreading.isChecked(),
185 | 'webpSpeed': self.comboBoxWebpSpeed.currentIndex(),
186 | 'webpFilterStrength': self.spinBoxWebFilterStrength.value(),
187 | 'webpSegments': self.spinBoxWebpSegments.value(),
188 | 'webpFilterSharpness': self.spinBoxWebpFilterSharpness.value(),
189 | 'jpegxlEncode': self.checkBoxJpegXlEncode.isChecked(),
190 | 'jpegxlDecode': self.checkBoxJpegXlDecode.isChecked(),
191 | 'jpegxlEncodeQActive': self.checkBoxJpegXlQ.isChecked(),
192 | 'jpegxlEncodeQ': self.spinBoxJpegXlQ.value(),
193 | 'jpegxlEncodeSizeActive': self.checkBoxJpegXlSize.isChecked(),
194 | 'jpegxlEncodeSize': self.spinBoxJpegXlSize.value(),
195 | 'jpegxlEncodeSpeed': self.comboBoxJpegXlSpeed.currentIndex(),
196 | 'jpegxlDecodeFormat': self.comboBoxJpegXlDecodeFormat.currentIndex(),
197 | 'jpegxlDecodeSjpeg': self.checkBoxJpegXlDecodesjpeg.isChecked(),
198 | 'jpegxlDecodeQ': self.spinBoxJpegXlDecodeQ.value(),
199 | 'mozjpegQ': self.spinBoxMozjpegQ.value(),
200 | 'mozjpegTune': self.comboBoxMozjpegTune.currentIndex()
201 | })
202 | if not os.path.exists('Preset'):
203 | os.makedirs('Preset')
204 | with open(os.path.join('Preset', self.lineEditPresetName.text() + ".json"), 'w') as outfile:
205 | json.dump(save_data, outfile)
206 | self.comboBoxPreset.clear()
207 | self.loadPresetStartup()
208 |
209 | def eventFilter(self, source, event):
210 | # Drag & Drop Stuff
211 | if (event.type() == QtCore.QEvent.Drop and
212 | event.mimeData().hasUrls()):
213 | for url in event.mimeData().urls():
214 | self.addFile(url.toLocalFile())
215 | return True
216 | return super().eventFilter(source, event)
217 |
218 | def addFile(self, filepath):
219 | if os.path.isfile(filepath):
220 | # Adding a single File
221 | self.listWidgetQueue.addItem(filepath)
222 | else:
223 | # Batch add files with subfolders
224 | if self.checkBoxBatchAddSubfolders.isChecked() is True:
225 | self.checkBoxBatchAdd.setChecked(True)
226 | n = len(filepath)
227 | for root, _, files in os.walk(filepath):
228 | for file in files:
229 | filepatha = os.path.join(root, file)
230 | ext = filepatha.lower()
231 | if ext.endswith((".jpg", ".jpeg", ".png")):
232 | self.listWidgetQueue.addItem(str(os.path.join(filepatha) + ";" + str(n)))
233 | else:
234 | # Batch add files without subfolder
235 | for filename in os.listdir(filepath):
236 | ext = filename.lower()
237 | if ext.endswith((".jpg", ".jpeg", ".png")):
238 | self.listWidgetQueue.addItem(os.path.join(filepath, filename))
239 |
240 | def ToggleJpegXlDecodeSettings(self):
241 | if self.comboBoxJpegXlDecodeFormat.currentIndex() == 1:
242 | self.checkBoxJpegXlDecodesjpeg.show()
243 | self.labelJpegXlDecodeQuality.show()
244 | self.spinBoxJpegXlDecodeQ.show()
245 | else:
246 | self.checkBoxJpegXlDecodesjpeg.hide()
247 | self.labelJpegXlDecodeQuality.hide()
248 | self.spinBoxJpegXlDecodeQ.hide()
249 |
250 | def ToggleJpegXlEncode(self):
251 | if self.checkBoxJpegXlEncode.isChecked() is True:
252 | self.checkBoxJpegXlDecode.setChecked(False)
253 | self.checkBoxJpegXlQ.setEnabled(True)
254 | self.spinBoxJpegXlQ.setEnabled(True)
255 | self.checkBoxJpegXlSize.setEnabled(True)
256 | self.spinBoxJpegXlSize.setEnabled(True)
257 | self.labelJpegXlSpeed.setEnabled(True)
258 | self.comboBoxJpegXlSpeed.setEnabled(True)
259 | self.labelJpegXlDecodeFormat.setEnabled(False)
260 | self.comboBoxJpegXlDecodeFormat.setEnabled(False)
261 | self.checkBoxJpegXlDecodesjpeg.setEnabled(False)
262 | self.labelJpegXlDecodeQuality.setEnabled(False)
263 | self.spinBoxJpegXlDecodeQ.setEnabled(False)
264 |
265 | def ToggleJpegXlDecode(self):
266 | if self.checkBoxJpegXlDecode.isChecked() is True:
267 | self.checkBoxJpegXlEncode.setChecked(False)
268 | self.checkBoxJpegXlQ.setEnabled(False)
269 | self.spinBoxJpegXlQ.setEnabled(False)
270 | self.checkBoxJpegXlSize.setEnabled(False)
271 | self.spinBoxJpegXlSize.setEnabled(False)
272 | self.labelJpegXlSpeed.setEnabled(False)
273 | self.comboBoxJpegXlSpeed.setEnabled(False)
274 | self.labelJpegXlDecodeFormat.setEnabled(True)
275 | self.comboBoxJpegXlDecodeFormat.setEnabled(True)
276 | self.checkBoxJpegXlDecodesjpeg.setEnabled(True)
277 | self.labelJpegXlDecodeQuality.setEnabled(True)
278 | self.spinBoxJpegXlDecodeQ.setEnabled(True)
279 |
280 | # This function disables visually Min/Max Q when lossless is toggled
281 | def ToggleAvifLossless(self):
282 | if self.checkBoxAvifLossless.isChecked() is True:
283 | self.spinBoxAvifMinQ.setEnabled(False)
284 | self.spinBoxAvifMaxQ.setEnabled(False)
285 | self.labelAvifMinQ.setEnabled(False)
286 | self.labelAvifMaxQ.setEnabled(False)
287 | else:
288 | self.spinBoxAvifMinQ.setEnabled(True)
289 | self.spinBoxAvifMaxQ.setEnabled(True)
290 | self.labelAvifMinQ.setEnabled(True)
291 | self.labelAvifMaxQ.setEnabled(True)
292 |
293 | # This function disables visually everything when custom settings is toggled
294 | # It also sets the text inside the textEdit Box
295 | def ToggleCustomSettings(self):
296 | if self.checkBoxCustomSettings.isChecked() is True:
297 | self.textEditCustomSettings.setEnabled(True)
298 | if self.comboBoxEncoders.currentIndex() == 0: # avif
299 | self.SetAvifParams(True)
300 | self.textEditCustomSettings.setText(self.avifParams)
301 | self.groupBoxAvif.setEnabled(False)
302 | elif self.comboBoxEncoders.currentIndex() == 1: # webp
303 | self.SetWebpParams(True)
304 | self.textEditCustomSettings.setText(self.webpParams)
305 | self.groupBoxWebp.setEnabled(False)
306 | elif self.comboBoxEncoders.currentIndex() == 2: # jpegxl
307 | if self.checkBoxJpegXlEncode.isChecked() is True:
308 | self.SetJpegXlParams(True)
309 | self.textEditCustomSettings.setText(self.cjxlParams)
310 | else:
311 | self.SetJpegXlDecodeParams(True)
312 | self.textEditCustomSettings.setText(self.djxlParams)
313 | self.groupBoxJpegXl.setEnabled(False)
314 | elif self.comboBoxEncoders.currentIndex() == 3: # mozjpeg
315 | self.SetMozJpegParams(True)
316 | self.textEditCustomSettings.setText(self.mozjParams)
317 | self.groupBoxMozjpeg.setEnabled(False)
318 | else: # CheckBox Custom Settings not checked
319 | self.textEditCustomSettings.setEnabled(False)
320 | if self.comboBoxEncoders.currentIndex() == 0:
321 | if self.checkBoxAvifLossless.isChecked() is False:
322 | self.spinBoxAvifMinQ.setEnabled(True)
323 | self.spinBoxAvifMaxQ.setEnabled(True)
324 | self.labelAvifMinQ.setEnabled(True)
325 | self.labelAvifMaxQ.setEnabled(True)
326 | self.groupBoxAvif.setEnabled(True)
327 | elif self.comboBoxEncoders.currentIndex() == 1:
328 | self.groupBoxWebp.setEnabled(True)
329 | elif self.comboBoxEncoders.currentIndex() == 2:
330 | self.groupBoxJpegXl.setEnabled(True)
331 | elif self.comboBoxEncoders.currentIndex() == 3:
332 | self.groupBoxMozjpeg.setEnabled(True)
333 |
334 | # Toggles the visibility of the encoder settings
335 | def ToggleUiElems(self):
336 | if self.comboBoxEncoders.currentIndex() == 0:
337 | self.groupBoxAvif.show()
338 | self.groupBoxWebp.hide()
339 | self.groupBoxJpegXl.hide()
340 | self.groupBoxMozjpeg.hide()
341 | elif self.comboBoxEncoders.currentIndex() == 1:
342 | self.groupBoxAvif.hide()
343 | self.groupBoxWebp.show()
344 | self.groupBoxJpegXl.hide()
345 | self.groupBoxMozjpeg.hide()
346 | elif self.comboBoxEncoders.currentIndex() == 2:
347 | self.groupBoxAvif.hide()
348 | self.groupBoxWebp.hide()
349 | self.groupBoxJpegXl.show()
350 | self.groupBoxMozjpeg.hide()
351 | elif self.comboBoxEncoders.currentIndex() == 3:
352 | self.groupBoxAvif.hide()
353 | self.groupBoxWebp.hide()
354 | self.groupBoxJpegXl.hide()
355 | self.groupBoxMozjpeg.show()
356 |
357 | # Toggles Target Size, PSNR and Lossless visually off
358 | def ToggleWebpQuality(self):
359 | if self.checkBoxWebpQuality.isChecked() is True:
360 | self.checkBoxWebpSize.setChecked(False)
361 | self.checkBoxWebpPSNR.setChecked(False)
362 | self.checkBoxWebpLossless.setChecked(False)
363 | self.spinBoxWebpPSNR.setEnabled(False)
364 | self.spinBoxWebpSize.setEnabled(False)
365 | self.spinBoxWebpQ.setEnabled(True)
366 | self.comboBoxWebpLossless.setEnabled(False)
367 |
368 | # Toggles Quality, PSNR and Lossless visually off
369 | def ToggleWebpSize(self):
370 | if self.checkBoxWebpSize.isChecked() is True:
371 | self.checkBoxWebpQuality.setChecked(False)
372 | self.checkBoxWebpPSNR.setChecked(False)
373 | self.checkBoxWebpLossless.setChecked(False)
374 | self.spinBoxWebpPSNR.setEnabled(False)
375 | self.spinBoxWebpSize.setEnabled(True)
376 | self.spinBoxWebpQ.setEnabled(False)
377 | self.comboBoxWebpLossless.setEnabled(False)
378 |
379 | # Toggles Quality, Target Size and Lossless visually off
380 | def ToggleWebpPSNR(self):
381 | if self.checkBoxWebpPSNR.isChecked() is True:
382 | self.checkBoxWebpQuality.setChecked(False)
383 | self.checkBoxWebpSize.setChecked(False)
384 | self.checkBoxWebpLossless.setChecked(False)
385 | self.spinBoxWebpPSNR.setEnabled(True)
386 | self.spinBoxWebpSize.setEnabled(False)
387 | self.spinBoxWebpQ.setEnabled(False)
388 | self.comboBoxWebpLossless.setEnabled(False)
389 |
390 | # Toggles Quality, Target Size and PSNR visually off
391 | def ToggleWebpLossless(self):
392 | if self.checkBoxWebpLossless.isChecked() is True:
393 | self.checkBoxWebpQuality.setChecked(False)
394 | self.checkBoxWebpSize.setChecked(False)
395 | self.checkBoxWebpPSNR.setChecked(False)
396 | self.spinBoxWebpPSNR.setEnabled(False)
397 | self.spinBoxWebpSize.setEnabled(False)
398 | self.spinBoxWebpQ.setEnabled(False)
399 | self.comboBoxWebpLossless.setEnabled(True)
400 |
401 | # Visually Toggles JpegXl Target Size / Quality
402 | def ToggleJpegXlQ(self):
403 | if self.checkBoxJpegXlQ.isChecked() is True:
404 | self.checkBoxJpegXlSize.setChecked(False)
405 | self.spinBoxJpegXlSize.setEnabled(False)
406 | self.spinBoxJpegXlQ.setEnabled(True)
407 |
408 | # Visually Toggles JpegXl Target Size / Quality
409 | def ToggleJpegXlSize(self):
410 | if self.checkBoxJpegXlSize.isChecked() is True:
411 | self.checkBoxJpegXlQ.setChecked(False)
412 | self.spinBoxJpegXlQ.setEnabled(False)
413 | self.spinBoxJpegXlSize.setEnabled(True)
414 |
415 | def open_image_source(self):
416 | if self.checkBoxBatchAdd.isChecked() is True:
417 | # Batch Adding
418 | image_input_batch = str(QFileDialog.getExistingDirectory(self, "Select Input Directory"))
419 | if self.checkBoxBatchAddSubfolders.isChecked() is True:
420 | n = len(image_input_batch)
421 | for root, _, files in os.walk(image_input_batch):
422 | for file in files:
423 | filepath = root + os.sep + file
424 | ext = filepath.lower()
425 | if ext.endswith((".jpg", ".jpeg", ".png")):
426 | self.listWidgetQueue.addItem(str(os.path.join(filepath) + ";" + str(n)))
427 | else:
428 | # Batch without Subfolders
429 | for filename in os.listdir(image_input_batch):
430 | ext = filename.lower()
431 | if ext.endswith((".jpg", ".jpeg", ".png")):
432 | self.listWidgetQueue.addItem(str(os.path.join(image_input_batch, filename)))
433 | else:
434 | # Add a single file
435 | file_name = QFileDialog()
436 | file_name.setFileMode(QFileDialog.ExistingFiles)
437 | names, _ = file_name.getOpenFileNames(self, "Select Image", "", "All Files (*)")
438 | if names:
439 | for file in names:
440 | # Adds the selected input file to the queue
441 | self.listWidgetQueue.addItem(file)
442 |
443 | def set_destination(self):
444 | # Set output dir
445 | self.image_output = str(QFileDialog.getExistingDirectory(self, "Select Output Directory"))
446 | self.labelOutput.setText("Output: " + self.image_output)
447 | self.output_set = True
448 |
449 | def ClearQueue(self):
450 | # Clears the Queue List
451 | self.listWidgetQueue.clear()
452 |
453 | def RemoveFromQueue(self):
454 | # Removes item(s) from the Queue List
455 | listItems = self.listWidgetQueue.selectedItems()
456 | if not listItems: return
457 | for item in listItems:
458 | self.listWidgetQueue.takeItem(self.listWidgetQueue.row(item))
459 |
460 | def showDialog(self, text):
461 | # Dialog to tell that encoding is finished
462 | msgBox = QMessageBox()
463 | msgBox.setIcon(QMessageBox.Information)
464 | msgBox.setText(text)
465 | msgBox.setWindowTitle("MegaPixel")
466 | msgBox.setStandardButtons(QMessageBox.Ok)
467 | msgBox.exec()
468 |
469 | # ═══════════════════════════════════════ Encoder Parameters ═══════════════════════════════════════
470 |
471 | # Sets the params for avif encoding
472 | def SetAvifParams(self, custom):
473 | if self.checkBoxCustomSettings.isChecked() is False or custom is True:
474 | self.avifParams = " --depth " + self.comboBoxAvifDepth.currentText()
475 | self.avifParams += " --yuv " + self.comboBoxAvifColorFormat.currentText()
476 | self.avifParams += " --range " + self.comboBoxAvifRange.currentText()
477 | if self.checkBoxAvifLossless.isChecked() is False:
478 | self.avifParams += " --min " + str(self.spinBoxAvifMinQ.value()) + " --max " + str(self.spinBoxAvifMaxQ.value())
479 | else:
480 | self.avifParams += " --lossless"
481 | self.avifParams += " --tilerowslog2 " + str(self.spinBoxAvifTileRows.value()) + " --tilecolslog2 " + str(self.spinBoxAvifTileCols.value())
482 | self.avifParams += " --speed " + str(self.spinBoxAvifSpeed.value()) + " --jobs " + str(self.spinBoxAvifThreads.value())
483 | else:
484 | self.avifParams = self.textEditCustomSettings.toPlainText()
485 |
486 | # Sets the params for webp encoding
487 | def SetWebpParams(self, custom):
488 | if self.checkBoxCustomSettings.isChecked() is False or custom is True:
489 | self.webpParams = " -preset " + self.comboBoxWebpPreset.currentText()
490 | if self.checkBoxWebpLossless.isChecked() is False:
491 | if self.checkBoxWebpPSNR.isChecked() is True:
492 | self.webpParams += " -psnr " + str(self.spinBoxWebpPSNR.value())
493 | if self.checkBoxWebpSize.isChecked() is True:
494 | self.webpParams += " -size " + str(self.spinBoxWebpSize.value() * 1000)
495 | if self.checkBoxWebpQuality.isChecked() is True:
496 | self.webpParams += " -q " + str(self.spinBoxWebpQ.value())
497 | self.webpParams += " -m " + str(self.comboBoxWebpSpeed.currentIndex())
498 | self.webpParams += " -segments " + str(self.spinBoxWebpSegments.value())
499 | self.webpParams += " -sns " + str(self.spinBoxWebNoiseShaping.value())
500 | self.webpParams += " -f " + str(self.spinBoxWebFilterStrength.value())
501 | self.webpParams += " -sharpness " + str(self.spinBoxWebpFilterSharpness.value())
502 | if self.checkBoxWebpMultiThreading.isChecked() is True:
503 | self.webpParams += " -mt "
504 | else:
505 | self.webpParams += " -z " + str(self.comboBoxWebpLossless.currentIndex())
506 |
507 | # Sets the params for jpegxl encoding
508 | def SetJpegXlParams(self, custom):
509 | if self.checkBoxCustomSettings.isChecked() is False or custom is True:
510 | self.cjxlParams = " --speed=" + str(self.comboBoxJpegXlSpeed.currentIndex() + 3)
511 | if self.checkBoxJpegXlSize.isChecked() is True:
512 | self.cjxlParams += " --target_size=" + str(self.spinBoxJpegXlSize.value() * 1000)
513 | elif self.checkBoxJpegXlQ.isChecked() is True:
514 | self.cjxlParams += " --quality=" + str(self.spinBoxJpegXlQ.value())
515 |
516 | # Sets the params for jpegxl decoding
517 | def SetJpegXlDecodeParams(self, custom):
518 | if self.checkBoxCustomSettings.isChecked() is False or custom is True:
519 | self.djxlParams = ""
520 | if self.comboBoxJpegXlDecodeFormat.currentIndex() == 1:
521 | self.djxlParams += " --jpeg_quality=" + str(self.spinBoxJpegXlDecodeQ.value())
522 | if self.checkBoxJpegXlDecodesjpeg.isChecked() is True:
523 | self.djxlParams += " --use_sjpeg"
524 |
525 | # Sets the MozJpeg params
526 | def SetMozJpegParams(self, custom):
527 | if self.checkBoxCustomSettings.isChecked() is False or custom is True:
528 | self.mozjParams = ""
529 | self.mozjParams += " -quality " + str(self.spinBoxMozjpegQ.value())
530 | self.mozjParams += " -tune-" + self.comboBoxMozjpegTune.currentText()
531 |
532 | # Sets the avif executable path
533 | def AvifPath(self):
534 | if platform.system() == "Windows":
535 | return " \"" + os.path.join(os.path.dirname(__file__), "Encoders", "avif", "avifenc.exe") + "\" "
536 | else:
537 | return "avifenc "
538 |
539 | # Sets the jpegxl encoder executable path
540 | def EJpegXlPath(self):
541 | if platform.system() == "Windows":
542 | return " \"" + os.path.join(os.path.dirname(__file__), "Encoders", "jpegxl", "cjpegxl.exe") + "\" "
543 | else:
544 | return "cjxl "
545 |
546 | # Sets the jpegxl decoder executable path
547 | def DJpegXlPath(self):
548 | if platform.system() == "Windows":
549 | return " \"" + os.path.join(os.path.dirname(__file__), "Encoders", "jpegxl", "djpegxl.exe") + "\" "
550 | else:
551 | return "djxl "
552 |
553 | # Sets the mozjpeg executable path
554 | def MozJpegPath(self):
555 | if platform.system() == "Windows":
556 | return " \"" + os.path.join(os.path.dirname(__file__), "Encoders", "mozjpeg", "cjpeg.exe") + "\" "
557 | else:
558 | return "cjpeg "
559 |
560 | # Sets the webp executable path
561 | def WebPPath(self):
562 | if platform.system() == "Windows":
563 | return " \"" + os.path.join(os.path.dirname(__file__), "Encoders", "webp", "cwebp.exe") + "\" "
564 | else:
565 | return "cwebp "
566 |
567 | # ══════════════════════════════════════════════ Main ══════════════════════════════════════════════
568 |
569 | def start_encoding(self):
570 | # Main Encoding function
571 | if self.output_set is True:
572 | self.SetAvifParams(False)
573 | self.SetWebpParams(False)
574 | self.SetJpegXlParams(False)
575 | self.SetMozJpegParams(False)
576 | self.encode()
577 | else:
578 | self.showDialog("Output Folder not set!")
579 |
580 | def worker_finished(self):
581 | self.showDialog("Encoding Finished.") # Message Box Finished Encoding
582 | self.progressBar.setValue(0) # Resets the Progressbar
583 |
584 | if self.checkBoxClearQueue.isChecked() is True:
585 | self.ClearQueue()
586 |
587 | def report_progress(self, signal):
588 | self.progressBar.setValue(signal)
589 |
590 |
591 | def encode(self):
592 | commands = [ ]
593 | # Creates argument list
594 | for i in range(self.listWidgetQueue.count()):
595 | image_input = self.listWidgetQueue.item(i).text()
596 | if self.checkBoxBatchAddSubfolders.isChecked() is True and self.checkBoxBatchAdd.isChecked() is True:
597 | # With Subfolders
598 | lengthSplit = image_input.rsplit(';', 1)[1] # 26
599 | image_input = image_input.rsplit(';', 1)[0] # PATH/TO/FILE
600 | temp_file_name = os.path.basename(image_input)
601 | n = int(lengthSplit)
602 | sub = image_input[n:]
603 | n = len(temp_file_name)
604 | sub = sub[:-n]
605 | if path.exists(self.image_output + sub) is False:
606 | (Path(self.image_output + sub)).mkdir(parents=True, exist_ok=True)
607 | imgOutput = os.path.join(self.image_output + sub, os.path.splitext(os.path.basename(image_input))[0])
608 | else:
609 | # Without Subfolders
610 | imgOutput = os.path.join(self.image_output, os.path.splitext(os.path.basename(image_input))[0])
611 |
612 | if self.comboBoxEncoders.currentIndex() == 0:
613 | # avifencoding
614 | avifCMD = self.AvifPath() + " " + self.avifParams + " \"" + image_input + "\" " + " \"" + imgOutput + ".avif\""
615 | commands.append(avifCMD)
616 | elif self.comboBoxEncoders.currentIndex() == 1:
617 | # webp encoding
618 | webpCMD = self.WebPPath() + self.webpParams + " \"" + image_input + "\" " + " -o \"" + imgOutput + ".webp\""
619 | commands.append(webpCMD)
620 | elif self.comboBoxEncoders.currentIndex() == 2:
621 | # jpegxl encoding / decoding
622 | if self.checkBoxJpegXlEncode.isChecked() is True:
623 | cjxlCMD = self.EJpegXlPath() + " \"" + image_input + "\" \"" + imgOutput + ".jxl\"" + self.cjxlParams
624 | commands.append(cjxlCMD)
625 | else:
626 | djxlCMD = self.DJpegXlPath() + " \"" + image_input + "\" \"" + imgOutput + "." + self.comboBoxJpegXlDecodeFormat.currentText() + "\" " + self.djxlParams
627 | commands.append(djxlCMD)
628 | elif self.comboBoxEncoders.currentIndex() == 3:
629 | # mozjpeg encoding
630 | mozjCMD = self.MozJpegPath() + self.mozjParams + " -outfile \"" + imgOutput + ".jpg\" \"" + image_input + "\""
631 | commands.append(mozjCMD)
632 |
633 | self.progressBar.setMaximum(len(commands)) # Sets the Max Value of Progressbar
634 |
635 | pool_size = self.spinBoxParallelWorkers.value()
636 | # Create a QThread object
637 | self.thread = QThread()
638 | # Create a worker object
639 | self.worker = worker.Worker()
640 | # Move worker to the thread
641 | self.worker.moveToThread(self.thread)
642 | # Connect signals and slots
643 | self.thread.started.connect(partial(self.worker.run, pool_size, commands))
644 | self.worker.finished.connect(self.thread.quit)
645 | self.worker.finished.connect(self.worker_finished)
646 | self.worker.progress.connect(self.report_progress)
647 | self.worker.finished.connect(self.worker.deleteLater)
648 | self.thread.finished.connect(self.thread.deleteLater)
649 | # Start the thread
650 | self.thread.start()
651 |
652 |
653 | if __name__ == "__main__":
654 | app = QtWidgets.QApplication(sys.argv)
655 | window = megapixel()
656 | app.exec_()
657 |
--------------------------------------------------------------------------------
/MegaPixel-Qt/worker.py:
--------------------------------------------------------------------------------
1 | """
2 | This script is the main encoding worker class
3 | which runs n-workers async in the threading model of qt.
4 |
5 | Author: Alkl58
6 | Date: 07.03.2021
7 | """
8 | from multiprocessing.dummy import Pool
9 | from functools import partial
10 | from subprocess import call
11 | from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot
12 |
13 | class Worker(QObject):
14 | """
15 | Worker Class
16 |
17 | Signals
18 | ----------
19 | progress : emits the progress of the subprogress in the run function
20 | finished : returns if all work is finished
21 | """
22 | progress = pyqtSignal(int)
23 | finished = pyqtSignal()
24 | @pyqtSlot()
25 | def run(self, pool_size, queue):
26 | """
27 | Attributes
28 | ----------
29 | pool_size : sets the amount of workers
30 | queue : queue list
31 | """
32 | pool = Pool(pool_size)
33 | finished_count = 1
34 | for i, _ in enumerate(pool.imap(partial(call, shell=True), queue)): # Multi Threaded Encoding
35 | self.progress.emit(finished_count)
36 | finished_count += 1
37 | print("Finished Worker: " + str(i))
38 | self.finished.emit()
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | MegaPixel-Qt
2 | Qt GUI for avif, webp, jpegxl and mozjpeg.
3 | Scroll down for Windows Version
4 |
5 | 
6 |
7 | ###  Installation
8 |
9 | 1. Install [avif](https://aur.archlinux.org/packages/libavif-git/) / [webp](https://developers.google.com/speed/webp/) / [jpegxl](https://aur.archlinux.org/packages/libjpeg-xl-git/) / [mozjpeg](https://aur.archlinux.org/packages/mozjpeg), they are located in AUR
10 | 2. Install [Python](https://www.python.org/)
11 | 3. Install [PyQt5](https://riverbankcomputing.com/software/pyqt/intro): `python -m pip install pyqt5`
12 | 4. Clone / Download [MegaPixel-Qt](https://github.com/Alkl58/MegaPixel-Qt/archive/main.zip)
13 | 5. Run `main.py`
14 |
15 | Windows Version
16 |
17 | 
18 |
19 | ###  Installation
20 |
21 | #### Stable Builds: [Releases](https://github.com/Alkl58/MegaPixel-Qt/releases)
22 |
23 |
24 | ### Feel free to port this to AUR or any other Linux Repository (I don't have the knowledge how to do it myself.)
25 |
26 |
27 | ##### Contacting me:
28 | You can find me on the unofficial [AV1 Discord](https://discord.gg/HSBxne3)
29 |
--------------------------------------------------------------------------------