merge-img
merge-img copied to clipboard
[OUTDATED] Roadmap v3
- [ ] Drop support Node v6
- [ ] Use Rollup for bundling
- [ ] ~Remove global
offsets
in favor of individual offsets.~ - [x] Support custom output logic.
- [ ] Support browser environment and browser build served via unpkg (fixes #1 and #3).
- [ ] Provide
mode
option so that user can choose either of merging strategiesmerge
,concat
,grid
,custom
(no default offsets according to image size, fixes #4). - [ ] Revise
README.md
- [ ] Provide image map for slicing
I've forked this though it's brutal - only useful for horizontal merge.
@elipeters Isn't it good enough with direction
option?
Could you explain more about the Provide image map for slicing
? I need more specific info to know what you supposed to suggest.
All websites were once built this way... slice up a large image and place inside tables then http request the heck out of it.
...though now in reverse...
output something like...
imgDimensions:{
width: [img1.width(), img2.width(),...],
height: [img1.height(), img2.height(),...]
}
or
map:[
img1: {x,y,width,height},
img2: {x,y,width,height},...
]
I apologise if I am not being clear. :)
Okay, based on what you said, I believe this is basically a serialized output for the metadata of composed images.
Please correct me again if it differs to what you thought.
In fact, there are couple of api in v3 (but not in v2) that expose the calculation of image chunks to allow a custom plugin for a image composition.
Maybe someone or me can write some plugin for this module to extract json-like object for the output via this api.
I would like to help this one
Provide mode option so that user can choose either of merging strategies merge, concat, grid, custom (no default offsets according to image size, fixes #4).
But I am not sure what is the specific definition about these strategies