{"id":28451883,"url":"https://github.com/doxakis/imagesizereader","last_synced_at":"2025-07-02T03:31:06.198Z","repository":{"id":38346017,"uuid":"242913660","full_name":"doxakis/ImageSizeReader","owner":"doxakis","description":"Getting image dimensions without reading an entire file.","archived":false,"fork":false,"pushed_at":"2020-02-26T22:39:34.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-06T17:09:29.191Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doxakis.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-25T04:57:59.000Z","updated_at":"2023-05-23T10:57:30.000Z","dependencies_parsed_at":"2022-08-25T02:42:12.840Z","dependency_job_id":null,"html_url":"https://github.com/doxakis/ImageSizeReader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/doxakis/ImageSizeReader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doxakis%2FImageSizeReader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doxakis%2FImageSizeReader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doxakis%2FImageSizeReader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doxakis%2FImageSizeReader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doxakis","download_url":"https://codeload.github.com/doxakis/ImageSizeReader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doxakis%2FImageSizeReader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263069063,"owners_count":23408892,"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":[],"created_at":"2025-06-06T17:09:29.946Z","updated_at":"2025-07-02T03:31:06.176Z","avatar_url":"https://github.com/doxakis.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image size reader\nGetting image dimensions without reading an entire file.\n\n- No GDI+ involved here, only pure c#\n- Optimized for memory consuption and being cloud friendly\n- Early stop when it cannot determine the dimensions\n\n# Install from Nuget\nTo get the latest version:\n```\nInstall-Package ImageSizeReader\n```\n\n# How to use\n\n```\nimport ImageSizeReader;\nimport ImageSizeReader.Model;\n\n// ...\n\nStream fileStream = File.OpenRead(file);\nIImageSizeReaderUtil util = new ImageSizeReaderUtil();\nvar dimensions = util.GetDimensions(fileStream);\n// dimensions.Width\n// dimensions.Height\n```\n\n## Notes\nOriginally, this is based on https://stackoverflow.com/a/112711 and associated comments to handle edge cases.\n\nIt has been tested with lot of different images. For example the [ImageSharp repo](https://github.com/SixLabors/ImageSharp) has many useful images for testing.\n\nIn order to improve the Jfif (aka JPEG File Interchange Format) decoding, the following page has been useful:\nhttp://vip.sugovica.hu/Sardi/kepnezo/JPEG%20File%20Layout%20and%20Format.htm\n\n# Copyright and license\nCode released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoxakis%2Fimagesizereader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoxakis%2Fimagesizereader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoxakis%2Fimagesizereader/lists"}