Here's the custom script for scanning the image in LCD image converter without the need for manual copying of every even line. In order to use the script you need to check the "Use custom script" checkbox. for (var y = 0; y < image.height; y++) { if (y % 2) { for (var x = image.width -1; x >= 0; x--) { image.addPoint(x, y); } } else { for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } } }
Came here to post this exact same thing. Really wish I would've seen that I could use a custom script after making 4 sprites manually. Thanks for sharing!
I had to invert the script, otherwise, on my matrix, the characters were all facing the wrong way. for (var y = 0; y < image.height; y++) { if (y % 2) { for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } } else { for (var x = image.width -1; x >= 0; x--) { image.addPoint(x, y); } } }
Good job but you can program LCD-Converter to separate even and odd lines : for (var y = 0; y < image.height; y++) { for (var x = 0; x < image.width; x++) { if (y%2==0) image.addPoint(x, y); else image.addPoint(image.width-1-x, y) } }
Yassss.... I have been looking for this solution for weeks now! Built the box a while ago and have been suffering through writing 256 individual assignments to each LED. Painful! Thanks a heap!
Hello. I have an improvement to make the array creation easier and faster. After setting the software up, in the PREPARE tab mark the option "Use custom script", and paste the next code: for (var y = 0; y < image.height; y++) { if ( y % 2 == 0) for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } else for (var x = image.width - 1; x >= 0; x--) { image.addPoint(x, y); } } This will create the arrays ready to be copied without the need of creating the backward code. Let me know if it worked for you, I just tested and it is fine. BTW, thanks for the tutorial.
I just wanted to type in the same code. Cheers mate for (var y = 0; y < image.height; y++) { for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } y=y+1; for (var x = image.width-1; x >= 0; x--) { image.addPoint(x, y); } }
You can make this INFINITELY easier on yourself by "interlacing" your image. Select every other line, straight across. Then flip what you've selected horizontally. You could streamline doing this multiple images of the same size (like animation frames) by making this selection into a mask. They just paste in each frame, select the mask, and flip the image lines. Save and repeat.
here's the code for the even/odd rows. for (var y = 0; y < image.height; y++) { if (y % 2 == 0){ for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } }else{ for (var x = image.width-1; x >= 0; x--) { image.addPoint(x, y); } } }
You can use the % (mod) operator on the for-loop for the lines ( if lineNum % 2 == 0 ), then on the pixels on that row, count 0-16 or 16-0 depending on that if-statement
Sorry to be a noob. Please help me out show the final script, I just can´t get it to work.... Here's the two diffrent scripts: * top to bottom * forward */ for (var y = 0; y < image.height; y++) { for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } } /* * top to bottom * backward */ for (var y = 0; y < image.height; y++) { for (var x = image.width - 1; x >= 0; x--) { image.addPoint(x, y); } }
If you are not interested in rewiring it, you should be able to handle this in code instead. Ex. If the row is odd, run the loop normally but if even then a seperate loop that accesses the column data in reverse.
Probably could have done this in the Arduino code like you just suggested, but someone here in the comments, Kevin Kratzke, found a solution to make the LCD Image Converter program change the way it creates the array by using the "Use custom script" option and entering this code: /* * top to bottom * forward/backward alternating */ for (var y = 0; y < image.height; y++) { for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } y++; for (var x = image.width - 1; x > -1; x--) { image.addPoint(x, y); } } I tried it, and it works perfectly, the array gets created in the left-right, right-left and then you just copy and paste in the Arduino code. Thanks for your comment and for watching of course!
I haven't gotten a chance to test it out on an connected matrix, but I think you can get LCD Image Converter to output the alternating line order by selecting "Use custom script" on the Prepare tab of the conversion options and using code like: /* * top to bottom * forward/backward alternating */ for (var y = 0; y < image.height; y++) { for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } y++; for (var x = image.width - 1; x > -1; x--) { image.addPoint(x, y); } } There might be a more elegant way to do it, but I looked at the output for a simple 8x8 rainbow gradient and it appeared that the lines were alternating correctly.
I think you're right, thanks a lot for sharing the solution, like I said in the video this LCD image converter software has a lot of options and your observation just made it even better!
Here is the script for the conversion so you don't have to copy and paste all those lines. /* * top to bottom * forward */ for (var y = 0; y < image.height; y++) { for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } y++; for (var x = image.width - 1; x >= 0; x--) { image.addPoint(x, y); } }
Also, don't use the "preview" to copy the code from, the app is a little buggy and doesn't update. So copy this script in, close + save the conversion, then File > Convert, and copy from the output file
I just suggested that I don't have such technical capabilities, but I believe you can, I'm very much looking forward to what you can do, and why the code I have transferred out is different from the image.
I followed your tutorial to the letter and for some reason im ending up with 22 rows and 16 lines for a 16x16 bmp image!? Tried all sorts, cant seem to get it to give me 16 rows. Really odd. Any ideas?
Programmed my own code for the lines to automatically flip.... AND THEN found out that multiple other people had done this. Darn. Oh well, here is my own code that seems to work: /* * top to bottom * forward and backward */ for (var y = 0; y < image.height;) { for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } for (var x = image.width - 1; x >= 0; x--) { image.addPoint(x, y+1); } y=y+2 }
I would look into using a scripting language to do that. You could write one script that would reverse every other line for you and use it with all pics.
Hi, a viewer of this video created a script like you are suggesting that you can input in the "use custom script" box of the software, and it does work perfectly. I copied and pasted is reply below if you want to check it out. Thank you for your comment and for watching btw. Kevin Kratzke2 months ago I haven't gotten a chance to test it out on an connected matrix, but I think you can get LCD Image Converter to output the alternating line order by selecting "Use custom script" on the Prepare tab of the conversion options and using code like: /* * top to bottom * forward/backward alternating */ for (var y = 0; y < image.height; y++) { for (var x = 0; x < image.width; x++) { image.addPoint(x, y); } y++; for (var x = image.width - 1; x > -1; x--) { image.addPoint(x, y); } } There might be a more elegant way to do it, but I looked at the output for a simple 8x8 rainbow gradient and it appeared that the lines were alternating correctly.
Nipuna Gunarathne scripts usually take a few minutes to write and you would Not have to dig around in any code. I thibk you misunderstoodwhat i said. And it looks as though what i said was already done
Maybe I am a bit late, but I was wondering how you display the color arrays of the Characters on the matrix? Are you using fast led? Maybe you can post an example code, that would be great! Edit: Watched your previous Video, now i understand it, i hope this method is less heap-intesnse since my 11x11 Matrix always ran out of free heap...
i think the output stream handler should reflect the topology. for this type of alternating lines (like my led matrix is configured) 4 lines of code did the trick for now. messing up the sprite data is kinda meh.
Hello Brainy good afternoon, your videos are amazing really, so I have a question, there is a way for putting together a scroll and an image in the 16x16 lcd matrix using the libraries NeoMatrix?
great tip with this program. how did you manage to film your matrix this way? i have great problems to make a foto or even a film of my matrix. in most times the lcds brighten all up and the camera sees no colos.
Is the image flipped? When you copied it the black margin was on the left (as a viewer sees it) but on the picture frame its on the rights as the viewer see it. BTW thank you for this as I was looking for a way to simplify ws2812 image generation on M5Stack products.
Nice one btw your channel helping me a lot but i had problem.. The problem is that why second array of same image?? Is that second array was for different sprite To animate?? Just help me i am noob...
if i want to download a image off of the web and off the website what size should the pictures be, i can you put text at the top and the image at the bottom (for holidays and stuff)?
Hi, Thank you for the video. Actually, I am trying to display any random coloured image on flexible LED display build by using WS2812B strips(60*45 = 2700 pixels) controlled by Arduino, so i just want to know if the same software i can use to convert images to Arduino Arrays for use on LED displays. Please help with this.
This program only works with single pixel drawing. It is not compatible with display libraries on arduino that can draw bitmaps. I need something that draws in 8x1 pixel rows, not 1x1. I want to uninstall the program on windows 10, but it doesn’t show up in my settings, but everything else does. How do I uninstall this program on windows 10?
how would i store this on a SD card instead of using the limited space on the arduino. what format should the data be in...i am guessing hex file to store the raw data?
I really need your help with something. I have everything the same like you but I have a 15 x 15 Led Martix. And a newer version of gimb 2.10.18 where can i set the settings at web and how can I save the Date at .bmp?
I'm using this version: Revision 466b2e2 from 2016-10-12 21:59:31 +0500 Qt 5.7.0 It's not the latest one so maybe some changes were made? Thanks for pointing that out, I'll check out the most recent version to see if it's different.
I made a custom script so you don't have to keep copying and pasting every other line. My setup was bottom to top then forward to backwards. So slightly differently than his but you just have to flip the for loops to make it like his. var i = 0; for (var y = image.height - 1; y >= 0; y--) { if(i == 0){ for (var x = 0; x < image.width; x++) { image.addPoint(x, y); i = 1; } } else{ for (var x = image.width - 1; x >= 0; x--) { image.addPoint(x, y); i = 0 } } }
@@danielkintana642 PUES USO OTRO PROGRAMA PARA LAS IMAGENES, POWER LED ESTUDIO BETA V0.8.9 HAGO EL LOGO Y LO PASO A BMP DE AHI USO EL OTRO PROGRAMA Y LO PASO A ARDUINO
3 года назад
Yo uso LED Matrix Studio, hasta te deja intercalar el código y no hacerlo a mano. dibujas y haces mil cosas
I have a question. you would be able to make an arduino project with a matrix matrix eg 32x32 and after pressing button 1 a red down arrow will appear, after pressing the button 2 you will see the red arrow up? arrows could be animated