Currently when the --retina flag is used, the input images are assumed to be the 2x version and the 1x version is generated by scaling. I'd like the option to provide two resolutions of each icon and have the 1x version used instead of a scaled version.
Apple's convention for this in UIKit and AppKit are to have filename.png and filename@2x.png for each asset. I see glue has adopted this in it's output, perhaps we could do the same for input files, so for a filenames like:
nav-arrow-left_hover.png
nav-arrow-left_hover@2x.png
nav-arrow-left.png
nav-arrow-left@2x.png
nav-arrow-right_hover.png
nav-arrow-right_hover@2x.png
nav-arrow-right.png
nav-arrow-right@2x.png
I'd like to supply a pull-request, but I'd like the maintainer's/community's opinion on a couple questions-
- Do we roll this into the
--retina and --ratios= commands, or make something separate?
Advantages of rolling into the existing commands would be that the user could supply pixel-perfect 1x versions for some icons and accept the scaled versions for others. Only problem with that is the abiguity between the fact that normally a filename without '@2x' goes to the '@2x' spritesheet, but in this case a filename with '@2x' goes to the standard resolution spritesheet (or we could adopt a convention of '@1x' instead?)
- Order of the suffixes, i.e.
nav-arrow-left_hover@2x.png or nav-arrow-left@2x_hover.png. I think I'm in favor of nav-arrow-left_hover@2x.png.
Currently when the
--retinaflag is used, the input images are assumed to be the 2x version and the 1x version is generated by scaling. I'd like the option to provide two resolutions of each icon and have the 1x version used instead of a scaled version.Apple's convention for this in UIKit and AppKit are to have
filename.pngandfilename@2x.pngfor each asset. I see glue has adopted this in it's output, perhaps we could do the same for input files, so for a filenames like:I'd like to supply a pull-request, but I'd like the maintainer's/community's opinion on a couple questions-
--retinaand--ratios=commands, or make something separate?Advantages of rolling into the existing commands would be that the user could supply pixel-perfect 1x versions for some icons and accept the scaled versions for others. Only problem with that is the abiguity between the fact that normally a filename without '@2x' goes to the '@2x' spritesheet, but in this case a filename with '@2x' goes to the standard resolution spritesheet (or we could adopt a convention of '@1x' instead?)
nav-arrow-left_hover@2x.pngornav-arrow-left@2x_hover.png. I think I'm in favor ofnav-arrow-left_hover@2x.png.