You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are the steps to reproduce?
running the code below, but each time using different arguments when calling the createImage() function.
What is the expected behaviour?
a new image which is composed by one other image ('smiley_24x24.png') that is repeated several times. For example the file '14x14_is_ok.png'
If I run createImage(14,14) I get the image that I expect.
What is the expected behaviour?
If I run createImage(15,15) I get an image with artifacts (last 16 composite images on the bottom are not there.
If I run createImage(16,16) I don't get an image at all, but I do get an error message Bus error: 10
The Bus error: 10 error is strange, because when I run just by it's own, I will get the error message and no image file
createImage(16,16)
But combined with a working call, It will create a 16x16 icons image (with the artifacts) and the 14x14. As if the correct output will cancel the previous error.
createImage(16,16)
createImage(14,14)
So there are two issues here, the image artifacts and the Bus error 10, but they seem very related to me.
Are you able to provide a standalone code sample, without other dependencies, that demonstrates this problem?
const sharp = require('sharp');
const fs = require('fs');
function createImage(designWidth,designHeigth){
const pixelImage = 'smiley_24x24.png';
var pixelSize = 24 // size of the smiley
var compositeImage = sharp({
create: {
width: designWidth * pixelSize,
height: designHeigth * pixelSize,
channels: 3,
background: { r: 200, g: 200, b: 200 } // grey background
}
})
let images = []
for (let y = 0; y < designHeigth; y++) {
for (let x = 0; x < designWidth; x++) {
images.push({input: pixelImage, left:x* pixelSize, top:y* pixelSize})
}
}
compositeImage.composite([...images.slice(0,209)])
.png().toBuffer().then(data=>{
fs.writeFileSync(`composite_test_${designWidth}x${designHeigth}.png`,data,'binary')
})
}
createImage(15,15)
Are you able to provide a sample image that helps explain the problem? 14x14_is_ok.png is like expected
15x15_with_artifacts
smiley_24x24.png is needed for the code.
The text was updated successfully, but these errors were encountered:
What is the output of running
npx envinfo --binaries --languages --system --utilities
?System:
OS: macOS 10.14
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 13.53 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.7.0 - /usr/local/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
Utilities:
Make: 3.81 - /usr/bin/make
GCC: 10.14. - /usr/bin/gcc
Git: 2.20.1 - /usr/bin/git
Languages:
Bash: 3.2.57 - /bin/bash
Java: 11.0.2 - /usr/bin/javac
Perl: 5.18.2 - /usr/bin/perl
PHP: 7.1.19 - /usr/bin/php
Python: 2.7.10 - /usr/bin/python
Ruby: 2.6.3 - /Users/paulverschoor/.rvm/rubies/ruby-2.6.3/bin/ruby
What are the steps to reproduce?
running the code below, but each time using different arguments when calling the
createImage()
function.What is the expected behaviour?
a new image which is composed by one other image ('smiley_24x24.png') that is repeated several times. For example the file '14x14_is_ok.png'
If I run
createImage(14,14)
I get the image that I expect.What is the expected behaviour?
If I run
createImage(15,15)
I get an image with artifacts (last 16 composite images on the bottom are not there.If I run
createImage(16,16)
I don't get an image at all, but I do get an error message Bus error: 10The Bus error: 10 error is strange, because when I run just by it's own, I will get the error message and no image file
But combined with a working call, It will create a 16x16 icons image (with the artifacts) and the 14x14. As if the correct output will cancel the previous error.
So there are two issues here, the image artifacts and the Bus error 10, but they seem very related to me.
Are you able to provide a standalone code sample, without other dependencies, that demonstrates this problem?
Are you able to provide a sample image that helps explain the problem?
14x14_is_ok.png is like expected
15x15_with_artifacts
smiley_24x24.png is needed for the code.
The text was updated successfully, but these errors were encountered: