test_nested_layers.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:pytoshop 作者: mdboom 项目源码 文件源码
def test_mixed_depth():
    from pytoshop.user.nested_layers import Group, Image

    img1 = np.empty((100, 80), dtype=np.uint8)
    img2 = np.empty((100, 80), dtype=np.uint16)

    layers = [
        Group(
            layers=[
                Image(channels={0: img1},
                      top=0, left=0, bottom=100, right=80),
                Image(channels=img2,
                      top=15, left=15),
            ])
    ]

    with pytest.raises(ValueError):
        nested_layers.nested_layers_to_psd(
            layers, enums.ColorMode.grayscale)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号