{"id":16134192,"url":"https://github.com/developpeurpascal/web-picture-crop","last_synced_at":"2026-02-15T07:33:52.638Z","repository":{"id":114056130,"uuid":"524613942","full_name":"DeveloppeurPascal/web-picture-crop","owner":"DeveloppeurPascal","description":"A sample script in JS+PHP to crop a picture by dragging a resize box on a web page","archived":false,"fork":false,"pushed_at":"2025-01-13T13:47:03.000Z","size":120,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-06T16:43:13.565Z","etag":null,"topics":["image-cropper","javascript","javascript-sample","php","php-sample","picture-cropper","sample-code"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeveloppeurPascal.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog/YYYYMMDD-User.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"DeveloppeurPascal","ko_fi":"patrick_premartin_en","patreon":"patrickpremartin","liberapay":"PatrickPremartin"}},"created_at":"2022-08-14T08:27:23.000Z","updated_at":"2025-01-13T13:47:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"910d8432-c424-476a-bb6b-74635c324c29","html_url":"https://github.com/DeveloppeurPascal/web-picture-crop","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/DeveloppeurPascal/web-picture-crop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloppeurPascal%2Fweb-picture-crop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloppeurPascal%2Fweb-picture-crop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloppeurPascal%2Fweb-picture-crop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloppeurPascal%2Fweb-picture-crop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeveloppeurPascal","download_url":"https://codeload.github.com/DeveloppeurPascal/web-picture-crop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloppeurPascal%2Fweb-picture-crop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29472880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T06:58:05.414Z","status":"ssl_error","status_checked_at":"2026-02-15T06:58:05.085Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["image-cropper","javascript","javascript-sample","php","php-sample","picture-cropper","sample-code"],"created_at":"2024-10-09T22:48:03.453Z","updated_at":"2026-02-15T07:33:52.623Z","avatar_url":"https://github.com/DeveloppeurPascal.png","language":"JavaScript","funding_links":["https://github.com/sponsors/DeveloppeurPascal","https://ko-fi.com/patrick_premartin_en","https://patreon.com/patrickpremartin","https://liberapay.com/PatrickPremartin","https://ko-fi.com/patrick_premartin_fr","https://www.patreon.com/patrickpremartin","https://www.paypal.com/paypalme/patrickpremartin"],"categories":[],"sub_categories":[],"readme":"# Onpage picture cropper\n\n[Cette page en français.](LISEZMOI.md)\n\nA sample script in JS+PHP to crop a picture by dragging a resize box on a web page.\n\nThis project is open sourced as a learning resource. I created this project in 02/2010 for a client website.\n\nExcept the sample pictures, you can use this project where you want. Just verify it's still up to date for PHP / JS version you need.\n\n(c) 2010 Patrick Prémartin\n\n## Talks and conferences\n\n### Twitch\n\nFollow my development streams of software, video games, mobile applications and websites on [my Twitch channel](https://www.twitch.tv/patrickpremartin) or as replays on [Serial Streameur](https://serialstreameur.fr) mostly in French.\n\n## Using this script\n\nThe functions are in /src/recadrer-image folder.\nA sample is in /src/exemple folder.\n\nTo crop a picture, call Recadrer_Image() function from /src/recadrer-image/recadrer-image.php\n\n```PHP\nfunction Recadrer_Image (\n\t// Source picture path (full path on the hosting service) (exemple : /home/monsite.fr/images/toto.jpg or c:\\folder\\folder\\toto.jpg)\n\t$sourcePathNomImage,\n\t// URL to the picture, relative to the calling page or absolute (exemple : /images/toto.jpg)\n\t$sourceURLImage,\n\t// Cropped picture path on the hosting service (absolute folder path + file name) (exemple : /home/monsite.fr/images/toto-recadree.jpg)\n\t$destinationPathNomImage,\n\t// URL to send the user after cropping the picture\n\t$retourURL,\n\t// Cropped picture width\n\t$destinationLargeur=180,\n\t// Cropped picture height\n\t$destinationHauteur=180,\n\t// Select frame width\n\t$cadreLargeurMin=100,\n\t// Select frame height\n\t$cadreHauteurMin=100,\n\t// URL to this script folder (relative to the web page or absolute URL) (exemple : /recadrer-image)\n\t$recadrerURL=\"/recadrer-image\"\n)\n```\n\n## Source code installation\n\nTo download this code repository, we recommend using \"git\", but you can also download a ZIP file directly from [its GitHub repository](https://github.com/DeveloppeurPascal/web-picture-crop).\n\n## Compatibility\n\nWhen I code, I work locally with XAMPP on Windows. My projects work for this stack.\n\nThere's no guarantee of compatibility with other software or versions, even though I try to keep my code clean and avoid using too many specific things.\n\nIf you detect any anomalies on earlier versions, please don't hesitate to [report them](https://github.com/DeveloppeurPascal/web-picture-crop/issues) so that I can test and try to correct or provide a workaround.\n\n## License to use this code repository and its contents\n\nThis source code is distributed under the [AGPL 3.0 or later license](https://choosealicense.com/licenses/agpl-3.0/).\n\nYou are generally free to use the contents of this code repository anywhere, provided that:\n* you mention it in your projects\n* distribute the modifications made to the files supplied in this project under the AGPL license (leaving the original copyright notices (author, link to this repository, license) which must be supplemented by your own)\n* to distribute the source code of your creations under the AGPL license.\n\nIf this license doesn't suit your needs, you can purchase the right to use this project under the [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) or a dedicated commercial license ([contact the author](https://trucs-de-developpeur-web.fr/nous-contacter.php) to explain your needs).\n\nThese source codes are provided as is, without warranty of any kind.\n\nCertain elements included in this repository may be subject to third-party usage rights (images, sounds, etc.). They are not reusable in your projects unless otherwise stated.\n\n## How to ask a new feature, report a bug or a security issue ?\n\nIf you want an answer from the project owner the best way to ask for a new feature or report a bug is to go to [the GitHub repository](https://github.com/DeveloppeurPascal/web-picture-crop) and [open a new issue](https://github.com/DeveloppeurPascal/web-picture-crop/issues).\n\nIf you found a security issue please don't report it publicly before a patch is available. Explain the case by [sending a private message to the author](https://trucs-de-developpeur-web.fr/nous-contacter.php).\n\nYou also can fork the repository and contribute by submitting pull requests if you want to help. Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file.\n\n## Support the project and its author\n\nIf you think this project is useful and want to support it, please make a donation to [its author](https://github.com/DeveloppeurPascal). It will help to maintain the code and binaries.\n\nYou can use one of those services :\n\n* [GitHub Sponsors](https://github.com/sponsors/DeveloppeurPascal)\n* Ko-fi [in French](https://ko-fi.com/patrick_premartin_fr) or [in English](https://ko-fi.com/patrick_premartin_en)\n* [Patreon](https://www.patreon.com/patrickpremartin)\n* [Liberapay](https://liberapay.com/PatrickPremartin)\n* [Paypal](https://www.paypal.com/paypalme/patrickpremartin)\n\nor if you speack french you can [subscribe to Zone Abo](https://zone-abo.fr/nos-abonnements.php) on a monthly or yearly basis and get a lot of resources as videos and articles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloppeurpascal%2Fweb-picture-crop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloppeurpascal%2Fweb-picture-crop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloppeurpascal%2Fweb-picture-crop/lists"}