JANG-Just-Another-NFT-Generator icon indicating copy to clipboard operation
JANG-Just-Another-NFT-Generator copied to clipboard

Genarete image based on posibility

Open arifintajul4 opened this issue 2 years ago • 4 comments

how to generate image based on possiblity example: 3 background 3 avatar

must be generate 6 image and all layer has been used

arifintajul4 avatar Jan 27 '23 04:01 arifintajul4

You can use Math.random() to generate a random number between 0 and 1 and then assign the possibilities of what you are trying to do. Note that this will change the outcome each time it is run

jamesbachini avatar Jan 27 '23 08:01 jamesbachini

Hi, I tried to add another layer with an assigned possibility. It is working, but this new layer overwrites the existing image, instead of overlapping. I could not figure out. Is there some kind of a "pixel mask" applied to your example images? I just drew a horizontal line in Paint and saved it as a 512x512 picture.

vasez avatar Mar 07 '24 23:03 vasez

Are you using transparent PNG images to overlap. If there is a white background to the image it will cover the previous layer

On Thu, Mar 7, 2024, 11:39 PM vasez @.***> wrote:

Hi, I tried to add another layer with an assigned possibility. It is working, but this new layer overwrites the existing image, instead of overlapping. I could not figure out. Is there some kind of a "pixel mask" applied to your example images? I just drew a horizontal line in paint and saved it as a 512x512 picture.

— Reply to this email directly, view it on GitHub https://github.com/jamesbachini/JANG-Just-Another-NFT-Generator/issues/4#issuecomment-1984785827, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE6GVY57UN7H3U7CS7ERG3LYXD3EDAVCNFSM6AAAAAAUIIQIBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBUG44DKOBSG4 . You are receiving this because you commented.Message ID: @.*** com>

jamesbachini avatar Mar 08 '24 05:03 jamesbachini

Thanks! I switched to PNG format, and applied a transparent background layer with GIMP, and it works :)

vasez avatar Mar 17 '24 18:03 vasez