{"id":19262694,"url":"https://github.com/exilon/quickimagefx","last_synced_at":"2025-04-21T18:31:14.100Z","repository":{"id":41867135,"uuid":"110708015","full_name":"exilon/QuickImageFX","owner":"exilon","description":"Simplifying image manipulation using GDI, Graphics32, OpenCV or Vampyre Imaging libraries","archived":false,"fork":false,"pushed_at":"2024-03-27T10:37:42.000Z","size":2648,"stargazers_count":79,"open_issues_count":2,"forks_count":27,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-07-31T22:35:28.304Z","etag":null,"topics":["bmp","delphi","gdi","gif","gr32","graphics","icons","image-manipulation","image-processing","imagelist","jpg","libvips","opencv","png","resize-algorithms","rotation","stream","transformations","vampyre"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exilon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-14T15:27:06.000Z","updated_at":"2024-07-24T14:51:15.000Z","dependencies_parsed_at":"2024-05-02T16:59:54.700Z","dependency_job_id":"e2e02332-3fc4-4ad3-9e65-e40fc876add8","html_url":"https://github.com/exilon/QuickImageFX","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exilon%2FQuickImageFX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exilon%2FQuickImageFX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exilon%2FQuickImageFX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exilon%2FQuickImageFX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exilon","download_url":"https://codeload.github.com/exilon/QuickImageFX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250110897,"owners_count":21376551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bmp","delphi","gdi","gif","gr32","graphics","icons","image-manipulation","image-processing","imagelist","jpg","libvips","opencv","png","resize-algorithms","rotation","stream","transformations","vampyre"],"created_at":"2024-11-09T19:32:59.575Z","updated_at":"2025-04-21T18:31:13.359Z","avatar_url":"https://github.com/exilon.png","language":"Pascal","readme":"﻿![alt text](docs/QuickImageFX.png \"QuickImageFx\") \n\nDelphi library for simplifying image load/save, conversion and transformation. Can load/save png, jpg, jxl, webp, avif, tiff, gif and bmp. Can get image from different resources: file, stream, http, imagelist, associated windows icon, executable file icon, etc... Rotate, flip, grayscale and many other transformations.\nGDI+, Graphics32, OpenCV, Vampyre and LibVips engines available.\n\n## Give it a star\nPlease \"star\" this project in GitHub! It costs nothing but helps to reference the code.\n![alt text](docs/githubstartme.jpg \"Give it a star\")\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=exilon/quickimagefx\u0026type=Date)](https://star-history.com/#exilon/quickimagefx\u0026Date)\n\n## Support\nIf you find this project useful, please consider making a donation.\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=BKLKPNEYKSBKL)\n\n*NEW: Delphi 12 Athens support\n\n*NEW: LibVips engine added\n\n*NEW: Interface based\n\n*NEW: Vampyre lib engine added\n\n*NEW: New functions added\n\n*NEW: Refactory classes\n\n*NEW: Delphinus support\n\n----------\nYou can select one or more of the available engines ImageFX supports. Add one or more of below units to your uses clause:\n\n- **Quick.ImageFX.GDI:** Uses GDI+ engine. No needs external libraries but it's slow.\n\t\n    Needed libraries:\n    \n    - QuickLibs from Exilon (https://github.com/exilon/QuickLibs)\n   \n- **Quick.ImageFX.GR32:** Uses Graphics32 engine to rotate, transform, resize, etc\n\n\tNeeded libraries:\n    \n\t- QuickLibs from Exilon (https://github.com/exilon/QuickLibs)\n\t- Graphics32 (https://github.com/graphics32/graphics32)\n\t- CCR-Exif from Chris Rolliston (https://code.google.com/archive/p/ccr-exif)   \n \n- **Quick.ImageFX.OpenCV:** OpenCV Engine. Uses a thrid party delphi warper for Intel Open Vision library. It's very fast and powerfull. Needs OpenCV external dll's in your project dir.\n\t\n    Needed libraries:  \n\t\n\t- QuickLibs from Exilon (https://github.com/exilon/QuickLibs)\n\t- Delphi-OpenCV from Laex (https://github.com/Laex/Delphi-OpenCV).  \n\t- CCR-Exif from Chris Rolliston (https://code.google.com/archive/p/ccr-exif)\n\t\n- **Quick.ImageFX.Vampyre:** Vampyre Imaging Library Engine. Uses a thrid party delphi warper for Vampyre Imaging native library. Fast and supports many image formats.\n\t\n    Needed libraries:  \n\t\n\t- QuickLibs from Exilon (https://github.com/exilon/QuickLibs)\n\t- Vampyre-Imaging from Marek Mauder (https://github.com/libvips/libvips/releases/tag/v8.15.1) \n\t- CCR-Exif from Chris Rolliston (https://code.google.com/archive/p/ccr-exif)\n\n- **Quick.ImageFX.Vips:** LibVips Imaging Library Engine. Uses a thrid party delphi warper for LibVips library. Ultra fast and supports many image formats like Webp, Avif, JXL, etc.\n\t\n    Needed libraries:  \n\t\n\t- QuickLibs from Exilon (https://github.com/exilon/QuickLibs)\n\t- LibVips from libVips (https://github.com/galfar/imaginglib.git) (Download needed dll's from releases zone)\n\t- CCR-Exif from Chris Rolliston (https://code.google.com/archive/p/ccr-exif)\n\n\n**Create:** Create instance of ImageFX to load/manipulate images.\n```delphi\nvar\n  ImageFX : IImageFX;\nbegin\n  ImageFX := TImageFXGDI //You can create as TImageFXGDI, TImageFXGR32, TImageFXOpenCV or TImageFXVampyre to use different graphic engines\n  ImageFX.LoadFromFile('.\\test.jpg');\n  ImageFX.Rotate90;\n  ImageFX.SaveAsPNG('.\\Test.png');\nend;\n```\n\n**Load/Save:** Can load/save png, jpg, gif and bmp and get image from different resources like file, stream, http, imagelist, associated windows icon, executable file icon, etc...\n\n```delphi\n//Load image from files like jpg, gif, png and bmp\nImageFX.LoadFromFile('.\\file.jpg');\n\t\n//Load/Save image from/to a memorystream, filestream, etc...\nImageFX.LoadFromStream(MyStream);\nImageFX.SaveToStream(MyStream,ifJPG);\n\t\n//Load image from an icon class\nImageFX.LoadFromIcon(MyIcon);\n\t\n//Load image from an icon file\nImageFX.LoadFromFileIcon('.\\file.ico');\n\t\n//Get image associated in windows with this type of extension\nImageFX.LoadFromFileExtension('.\\file.xls',True);\n\t\n//Load from exe resource\nImageFX.LoadFromResource('Main.ico');\n\t\n//Get image from a http link\nImageFX.LoadFromHTTP('http://www.mysite.com/file.jpg',ReturnHTTPCode,True);\n\t\n//Load/Save from string\nImageFX.LoadFromString(MyImageString);\nImageFX.SaveToString(MyImageString);\n```\n\t\n**Image Info:** Get resolution, aspect ratio of an image.\n\n```delphi\nImageFX.GetResolution(x,y)\nImageFX.AspectRatioStr //aspect ratio (4:3,16:9)\nImageFX.IsGray\n```\n\t\t\n**Image Resize:**\n\n```delphi\n//Resize image to fit max bounds of 500x300 and fills rest of target size with a border black color\nImageFX.ResizeOptions.BorderColor := clBlack; \nImageFX.Resize(500,300, rmFitToBounds, [rfCenter], rmLinear);\n\n//Same image resize alternative/advanced mode\nImageFX.ResizeOptions.ResamplerMode := rmLinear;\nImageFX.ResizeOptions.ResizeMode := rmFitToBounds;\nImageFX.ResizeOptions.Center := True;\nImageFX.ResizeOptions.FillBorders := True;\nImageFX.ResizeOptions.BorderColor := clBlack;\nImageFX.Resize(500,300);\n```\n\n**ResizeOptions:**\n\t\t\t\n- **NoMagnify:** If true not resize image if smallest than especified new size.    \n\n- **ResizeMode:** Resize algorithms to calculate desired final size:\n\t - **rmStretch** Stretch original image to fit target size without preserving original aspect ratio.\n\t - **rmScale** Recalculate width or height target size to preserve original aspect ratio.\n\t - **rmCropToFill** Preserve target aspect ratio cropping original image to fill whole size.\n\t - **rmFitToBounds** Resize image to fit max bounds of target size.\n\n- **ResamplerMode:** Resize algorithms to be applied:\n\t - **rsAuto** Uses rmArea for downsampling and rmLinear for upsampling\n\t - **rsGDIStrech** GDI only mode.\n\t - **rsNearest** Low quality - High performance.\n\t - **rsGR32Draft** GR32 only. Medium quality - High performance (downsampling only).\n\t - **rsOCVArea** OpenCV only. Medium quality - High performance (downsampling only).\n\t - **rsLinear** Medium quality - Medium performance.\n\t - **rsGR32Kernel** GR32 only. High quality - Low performance (depends on kernel width).\n\t - **rsOCVCubic** OpenCV only. High quality - Medium/Low performance.\n\t - **rsOCVLanczos4** OpenCV only. High quality - Low performance.\n\n- **Center:** Centers image\n\n- **FillBorders:** Fill borders of a scaled image in destination rectangle if smaller.\n\n- **BorderColor:** Color of filling borders.\n\n**Transforms:** Apply rotations, flips, scanline effects, bright  and others transformations to your images.\n\n```delphi\n//Rotate image 90 degrees\nImageFX.Rotate90;\n    \n//Rotate image 45 degrees\nImageFX.RotateAngle(45);\n    \n//Convert to grayscale\nImageFX.GrayScale;\n    \n//Flip image horizontally\nImageFX.FlipX;\n    \n//Increase bright by 50%\nImageFX.Lighten(50);\n    \n//Change color of a pixel\nPixInfo.R := Random(255); //R\nPixInfo.G := Random(255); //G\nPixInfo.B := Random(120); //B\nPixInfo.A := 200; //Alpha\nimageFX.Pixel[x,y] := PixInfo;\n    \n//Draw an overlay image over current image with 50% transparency\nImageFX.DrawCentered(pngimage,0.5);\n```\n\n**Format conversions:** Can convert between image formats.\n\n```delphi\nImageFX.LoadFromFile('.\\myfile.jpg');\nImageFX.SaveAsPNG('.\\myfile.png');\n```\n\n**Almost all functions return self class, so you can chain many actions and effects like this:**\n\n```delphi\n//Rotate 90 degrees and flip horizontally, convert to grayscale and save to a png file.\nImageFX.Rotate90.FlipX.GrayScale.SaveToPNG('.\\myfile.png');\n        \n// Load from file, rotate180, resize to 100x100 and assign to a TImage.    \nMyImage.Picture.Asssign(ImageFX.LoadFromFile('.\\myfile.jpg').Rotate180.Resize(100,100).AsBitmap);\n```\n\n\u003eDo you want to learn delphi or improve your skills? [learndelphi.org](https://learndelphi.org)\n\n\n","funding_links":["https://www.paypal.com/donate/?hosted_button_id=BKLKPNEYKSBKL"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexilon%2Fquickimagefx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexilon%2Fquickimagefx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexilon%2Fquickimagefx/lists"}