Skip to content

Commit

Permalink
Load the resource from the subpackage.
Browse files Browse the repository at this point in the history
Closes #2
  • Loading branch information
jaraco committed Aug 20, 2024
1 parent bde5bcf commit 74be21f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jaraco/imaging.py → jaraco/imaging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"""

import argparse
import functools
import io
import struct
import operator
import functools
import struct
from collections import namedtuple

import PIL.Image
import jaraco.clipboard
from importlib_resources import files

import jaraco.clipboard


def calc_aspect(size):
"aspect = size[0] / size[1] # width/height"
Expand Down Expand Up @@ -58,7 +59,7 @@ def resize_with_aspect(image, max_size, *args, **kargs):


def load_apng():
apng = files('jaraco') / 'sample.png'
apng = files() / 'sample.png'
return PIL.Image.open(io.BytesIO(apng.read_bytes()))


Expand Down
File renamed without changes

0 comments on commit 74be21f

Please sign in to comment.