PHPackages                             jsnlib/copy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. jsnlib/copy

ActiveLibrary[Image &amp; Media](/categories/media)

jsnlib/copy
===========

1.1.0(8y ago)0291MITPHPPHP &gt;=7.0.0

Since Mar 8Pushed 8y agoCompare

[ Source](https://github.com/fdjkgh580/jsnlib-copy)[ Packagist](https://packagist.org/packages/jsnlib/copy)[ RSS](/packages/jsnlib-copy/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (7)Used By (1)

jsnlib-copy
===========

[](#jsnlib-copy)

複製來源圖片到指定路徑，還可以縮圖處理。

使用方式
----

[](#使用方式)

```
require_once '../vendor/autoload.php';

$Urlimg = new Jsnlib\Copy\Urlimg;

//1.想要儲存的絕對路徑
$savedir            =   realpath("demo_savedir");

//2. 指定圖片網址，並COPY兩張縮小的、兩張原圖
$Urlimg
	->url("http://www.xxx.tw/upload/Ad/File_2016082620423388.JPG")
	->resize(100, 100, 1, $savedir, "s.jpg") //不指定檔名就是自動產生檔名
	->resize(100, 100, 10, $savedir, "s2.jpg")
	->org($savedir, "o.jpg")
	->copy();

//3. 檢視成果
$result = $Urlimg->result();

if ($result !== false) foreach ($result as $file)
{
	echo $file."";
}
```

url($url): object
-----------------

[](#urlurl-object)

設定來源網址

resize(int $width, int $height, int $quantity, string $save\_dir, string $newname = NULL): object
-------------------------------------------------------------------------------------------------

[](#resizeint-width-int-height-int-quantity-string-save_dir-string-newname--null-object)

儲存縮圖

- width (int) 重新縮圖的寬度
- height (int) 重新縮圖的高度
- quantity (int) 縮圖品質 0% ~ 100%
- save\_dir (string) 儲存的絕對路徑
- newname (string)(選) 儲存的檔名

org(string $save\_dir,string $newname = NULL): object
-----------------------------------------------------

[](#orgstring-save_dirstring--newname--null-object)

儲存原圖

- save\_dir (string) 儲存的絕對路徑
- newname (string)(選) 儲存的檔名

copy($mode = 0775): object
--------------------------

[](#copymode--0775-object)

運行複製

- mode 權限值

result()
--------

[](#result)

取得結果

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

6

Last Release

2963d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.2.4

1.1.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4161e8ee5212efdcdaa6a42183109f397f25c852655ec4b73cce9920cf94f2a?d=identicon)[fdjkgh580](/maintainers/fdjkgh580)

---

Top Contributors

[![fdjkgh580-2](https://avatars.githubusercontent.com/u/60056647?v=4)](https://github.com/fdjkgh580-2 "fdjkgh580-2 (9 commits)")

---

Tags

urlimageresizecopyimages

### Embed Badge

![Health badge](/badges/jsnlib-copy/health.svg)

```
[![Health](https://phpackages.com/badges/jsnlib-copy/health.svg)](https://phpackages.com/packages/jsnlib-copy)
```

###  Alternatives

[intervention/image

PHP Image Processing

14.3k194.3M2.2k](/packages/intervention-image)[gumlet/php-image-resize

PHP class to re-size and scale images

1.2k5.7M53](/packages/gumlet-php-image-resize)[masterexploder/phpthumb

A library for manipulating images in PHP.

981751.7k16](/packages/masterexploder-phpthumb)[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

860918.1k11](/packages/sybio-image-workshop)[jbzoo/image

A PHP class that simplifies working with images

171126.9k3](/packages/jbzoo-image)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M100](/packages/intervention-image-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
