jrsmith3 / cardbleed Goto Github PK
View Code? Open in Web Editor NEWCreate images with bleed from pdf of card images
Create images with bleed from pdf of card images
I am seeing a single strip of white pixels at the border between the original card image and its bleed. For example, a PDF containing this image:
Ends up looking like (white strip of pixels annotated):
Add a --strip
argument to the cli. This argument can be called zero or more times. Each time it is called, it takes one of the following values: "top", "bottom", "left", "right". The presence of this argument will result in a single row of pixels removed from each image of the PDF on the side corresponding to the value of the argument. For example, --strip=right
will remove the rightmost row of pixels from the image before adding the bleed. This --strip=right
example would fix the problem depicted in the images above. Calling the --strip
argument multiple times with the same value is equivalent to calling it once with that value.
Images taken from Fantasy Flight Games.
I should add a CHANGELOG
file to this project to keep track of which tickets correspond to which releases.
I would like to create images suitable for printing, so the DPI should be configurable.
Calling cardbleed
should have the intended effect of adding bleeds to the specified image, and writing the result to the specified location in the filesystem.
This project needs an interface that isn't an interactive python shell.
Write argparse
code that will create the following command-line interface:
python cardbleed --width=WIDTH --height=HEIGHT \
--bleed_width=BLEED_WIDTH --bleed_height=BLEED_HEIGHT \
--crop_strategy=STRATEGY FILENAME.PDF OUTPUT_DIRECTORY
Where WIDTH
and HEIGHT
are the width and height, respectively, of the card as it appears in the image. BLEED_WIDTH
and BLEED_HEIGHT
is the overall width and height, respectively, of the card including the bleed. CROP_STRATEGY
is "smaller" or "larger". FILENAME.PDF
is the input file, and OUTPUT_DIRECTORY
is the location to which the front and back card images are to be written.
The application does not produce any output during operation, so it may not be clear to the user if it is working.
-q
, --quiet
command line argument to suppress all output.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.