![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A simple tool that merges two images and return a url where the final image has been uploaded to.
Using PicMerge is pretty simple.
Fair warning PicMerge is written entirely in ES6. So please make sure you're transpiling your Javascript code somewhere in your build process.
Run npm install picmerge --save
, or if you're cool, use yarn. yarn add picmerge
const picMerge = require('picmerge');
If the name doesn't suit your context, you may do something like...
const kudiReferralImg = require('picmerge');
This is the fun part.
picMerge(firstImageURL, secondImageURL)
.then(url => {
//do anything with the url here
console.log(url);
})
If no exceptions are thrown, the url
variable would hold a string representation of the URL for the merged picture.
Because shit happens, you may want to do this:
picMerge(firstImageURL, secondImageURL)
.then(url => {
//do anything with the url here
console.log(url);
})
.catch(err => {
//handle err
})
This would save you from events in which an error occurs while picMerge does it's magic.
Later, you may be able to pass in a default url to the picMerge function. So, in the event that an error occurs, picMerge would return the url for some default Image you have specified.
Something like:
const mergedPicsURL = picMerge(firstImageURL, secondImageURL, defaultImageURL)
Here are two urls.
const bgImg = 'http://i.imgur.com/7mb8Bcl.png';
const profilePic = 'http://i.imgur.com/sMayycp.png';
Below is the Background Image:
And the Profile Picture:
Update your code:
const bgImg = 'http://i.imgur.com/7mb8Bcl.png';
const profilePic = 'http://i.imgur.com/sMayycp.png';
const picMerge = require('./picMerge');
picMerge(bgImg, profilePic)
.then(url => {
console.log(url)
})
when the picMerge promise is fufilled, res
is http://res.cloudinary.com/blushcow/image/upload/v1490510074/vyh2qan9awf6whoidasp.jpg
Well, nothing else for now.
FAQs
Simple picture merge script
The npm package picmerge receives a total of 4 weekly downloads. As such, picmerge popularity was classified as not popular.
We found that picmerge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.