Commit Graph

74 Commits

Author SHA1 Message Date
Ben Olden-Cooligan
8906f5b76e Provide IPdfRenderer from ProcessedImage 2024-02-06 20:22:48 -08:00
Ben Olden-Cooligan
37032983f5 Rename ImagePixelFormat.Unsupported to Unknown 2024-01-03 15:55:02 -08:00
Ben Olden-Cooligan
0afea36ba5 Rename ImageFileFormat.Unspecified to Unknown 2024-01-03 15:53:38 -08:00
Ben Olden-Cooligan
0b93ca2a15 Calculate LogicalPixelFormat lazily 2024-01-03 15:52:19 -08:00
Ben Olden-Cooligan
ae89fa60d7 Update copyright year to 2024 2023-12-30 14:45:47 -08:00
Ben Olden-Cooligan
804f110504 Update dependency versions 2023-11-25 13:41:29 -08:00
Ben Olden-Cooligan
c5def912e6 Gdi: Fix resolution of saved image in some cases
Seems to be a weird GDI bug that images created directly from a stream don't persist newly specified resolutions (possibly an optimization to try and just persist the exact same loaded image). Using the same copying logic as LoadFrames resolves the problem.
2023-07-05 16:19:23 -07:00
Ben Olden-Cooligan
3c2e6a70a5 Sdk: Project configuration 2023-04-29 16:28:41 -07:00
Ben Olden-Cooligan
b333d6c89b Add ImageSaveOptions and optimize pixel format for saving 2023-02-05 13:54:21 -08:00
Ben Olden-Cooligan
a24f6211de Gdi copy-on-write is not thread safe
Fixes #48
2023-01-07 13:54:18 -08:00
Ben Olden-Cooligan
04451c4511 Move copyright to CommonTargets and update to 2023 2023-01-01 14:14:52 -08:00
Ben Olden-Cooligan
671a3a4b28 Clean up todos 2022-12-29 21:50:10 -08:00
Ben Olden-Cooligan
46259d2a7a Reorganize NAPS2.Setup files 2022-12-19 14:17:28 -08:00
Ben Olden-Cooligan
f066c3e41d Gtk: Fix various tests 2022-12-18 17:33:23 -08:00
Ben Olden-Cooligan
574aac9aad WinForms: Fix scale up transform 2022-12-04 19:10:47 -08:00
Ben Olden-Cooligan
2bbc1cd497 WinForms: Fix scale off-by-one 2022-12-02 16:37:11 -08:00
Ben Olden-Cooligan
5969e7b726 WinFormsListView custom rendering 2022-11-27 15:23:48 -08:00
Ben Olden-Cooligan
4251c43407 Update exception messages 2022-11-05 19:48:13 -07:00
Ben Olden-Cooligan
c1f946df5f WIP: JPEG200 support, just on Mac for now 2022-10-10 18:25:59 -07:00
Ben Olden-Cooligan
3894645069 Use IAsyncEnumerable with a producer model
This replaces AsyncSource and simplifies various things. Also some cleanups / tests.
2022-09-27 18:12:36 -07:00
Ben Olden-Cooligan
6f66652099 Change ImageContext.LoadFrames to return AsyncSource 2022-09-25 17:54:11 -07:00
Ben Olden-Cooligan
433a838231 Unify progress callbacks and cancellation in ProgressHandler 2022-09-25 16:54:41 -07:00
Ben Olden-Cooligan
10a2a1df8f Change rmse and invert to bitwise ops/primitives 2022-09-25 13:07:01 -07:00
Ben Olden-Cooligan
e1316d6640 Standardize on loading images from streams internally
This simplifies and standardizes a bunch of things.

For GDI we also copy file streams to memory streams, to ensure safety all the way through. This also means we don't need SafeClone any more.
2022-09-19 20:35:58 -07:00
Ben Olden-Cooligan
099fab0221 Add LogicalPixelFormatOp and make ImageContext load methods share logic 2022-09-18 12:58:43 -07:00
Ben Olden-Cooligan
59f11f9fe4 Refactor tiff writing into a separate interface 2022-09-17 11:10:51 -07:00
Ben Olden-Cooligan
f01bf7e414 Rework tiff saving and add image load/save tests 2022-09-15 19:02:09 -07:00
Ben Olden-Cooligan
9ebb7853ef Linux: Implement transforms and fix tests 2022-09-14 21:10:55 -07:00
Ben Olden-Cooligan
7e707381cc Use per-project licenses 2022-09-11 18:40:47 -07:00
Ben Olden-Cooligan
1c0a7074d2 Remove final gdi references from NAPS2.Sdk 2022-09-11 17:48:05 -07:00
Ben Olden-Cooligan
24633e2bee Add ImageContext to IMemoryImage and add transform extensions 2022-08-30 17:56:00 -07:00
Ben Olden-Cooligan
0d92b9d7e1 Add ImageContext to ProcessedImage and Render extensions
This reduces the amount we need to pass around ImageContext. Will probably followup doing the same for IMemoryImage and transforms.
2022-08-30 09:07:27 -07:00
Ben Olden-Cooligan
59426f0921 Implement sharpening as a bitwise op
Finally all sdk tests passing on mac!
2022-08-21 11:44:23 -07:00
Ben Olden-Cooligan
65ac32defe Verify pixel formats & palettes in GdiImage
Also remove old IMemoryImage.Lock overload and pull out the gdi logic into GdiImageLockState
2022-08-16 23:08:49 -07:00
Ben Olden-Cooligan
e1772d41a1 Windows: Fix tests 2022-08-16 21:19:04 -07:00
Ben Olden-Cooligan
79b2c92f5a Change all projects to net6 and fix WinForms compilation 2022-08-16 21:02:01 -07:00
Ben Olden-Cooligan
47a5ecccdf Move ProcessedImage to Sdk and UiImage to Lib.Common 2022-08-15 18:39:01 -04:00
Ben Olden-Cooligan
adf39c4eb5 Implement saturation as a bitwise op 2022-08-14 17:50:14 -04:00
Ben Olden-Cooligan
bd18da1724 Delete deprecated ContrastTransform
This has long been disused in favor of TrueContrastTransform. I've only kept it around in case of recovery, but I think 5? years is enough time to say you'll lose unsaved data...
2022-08-14 15:28:20 -04:00
Ben Olden-Cooligan
f9e6969ae1 Add render tests and fix b/w clone on mac 2022-08-14 12:01:06 -04:00
Ben Olden-Cooligan
0e363e1892 Mac: Implement scale and thumbnail transforms 2022-08-13 17:09:49 -04:00
Ben Olden-Cooligan
1a13673f7f Implement crop and hue shift with bitwise ops
This lets us get rid of the now-obsolete UnsafeImageOps class
2022-08-13 15:21:28 -04:00
Ben Olden-Cooligan
c24dc0fbc9 Refactor PixelInfo to separate out pointer and subpixel type
This results in vastly simpler calling code. e.g. if the data is constructed, PixelInfo can provide the required length/stride. If the data is a byte array, it can be fixed inside the op. If the subpixel type is conditional, it can be put in a variable.
2022-08-13 11:50:11 -04:00
Ben Olden-Cooligan
14ed01e5c2 WIP: Use BitwiseImageOp abstraction for pixel manipulation 2022-08-11 19:38:54 -04:00
Ben Olden-Cooligan
ef72059024 Mac support WIP 2022-08-04 17:15:43 -07:00
Ben Olden-Cooligan
59223dfc7a Switch from PdfSharp to a PdfSharpCore fork, using custom rendering logic
As well as helping move towards cross-platform support, this results in massive performance gains (which can probably be improved even further). However there is some extra complexity that hopefully we can pare down later.
2022-08-03 19:44:51 -07:00
Ben Olden-Cooligan
9bfab0d20e WIP: Importing raw pdf image data for performance & black/white support 2022-07-31 21:12:06 -07:00
Ben Olden-Cooligan
c10f12a6b2 Add pdf import tests for naps2-generated pdfs 2022-07-31 13:15:08 -07:00
Ben Olden-Cooligan
b72aefe71d Use a new IMemoryImage.SafeClone method to ensure safety of in-memory storage 2022-07-31 13:10:48 -07:00
Ben Olden-Cooligan
7f87a681f6 Move ClientCreds to NAPS2.Lib.Common and avoid custom prebuild 2022-07-29 22:09:34 -07:00