# Convert Image into ascii value

**URL:** <https://discourse.processing.org/t/convert-image-into-ascii-value/14602>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [October 11, 2019, 8:39am UTC](https://discourse.processing.org/t/convert-image-into-ascii-value/14602 "2019-10-11T08:39:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shonerudeetha](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@shonerudeetha](https://discourse.processing.org/u/shonerudeetha)\
**Post date:** [October 11, 2019, 8:39am UTC](https://discourse.processing.org/t/convert-image-into-ascii-value/14602/1 "2019-10-11T08:39:39Z")

</div>

sir,i am a beginner for processing…my aim is convert any image into a blinking LED.i did any ascii value into blinking LEd via arduino…Now i need to know how to convert a given image into ascii value… …because i did ascii into blinking LED…i thaught it can doing with processing…with serial communication… plz help me to import an image via processing and convert into ascii value …this project is important for my studies.i need some help

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [October 11, 2019, 9:44am UTC](https://discourse.processing.org/t/convert-image-into-ascii-value/14602/2 "2019-10-11T09:44:49Z")

</div>

How do you want to do this conversion from image to ascii?

You could for loop over each pixel of the image and assign the degrees of brightness or color certain ascii values.

Do you mean this?

---

<div class="post-metadata">

**Author:** ![shonerudeetha](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@shonerudeetha](https://discourse.processing.org/u/shonerudeetha)\
**Post date:** [October 11, 2019, 10:30am UTC](https://discourse.processing.org/t/convert-image-into-ascii-value/14602/3 "2019-10-11T10:30:42Z")

</div>

my project is lifi…i have made a arduino simple project to send any ascii value via blinking LED…other side i have made recieving side with a photo resister.i got that sgnals(from the blinking LED) to the LDR (in the recieving side) and decoded to the previous ascii value which is input to the sending side earlier…sending a ascii value through the visible light is ok…  
now i want to send a image via visible light …please give me solution.i still have a method to conversion.i just thaught if i have a method of converting imaging into ascii i can coonect to the arduino part

---

<div class="post-metadata">

**Author:** ![shonerudeetha](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@shonerudeetha](https://discourse.processing.org/u/shonerudeetha)\
**Post date:** [October 11, 2019, 10:35am UTC](https://discourse.processing.org/t/convert-image-into-ascii-value/14602/4 "2019-10-11T10:35:23Z")

</div>

my aim is sending any image from the transmiting part to the recieving side…therefore i just want to encode image …i just did sending ascii values to the other side…i just thaught if there any method to doing in processing to sending a image to the. other side…plz giv me a solution…

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [October 11, 2019, 11:21am UTC](https://discourse.processing.org/t/convert-image-into-ascii-value/14602/5 "2019-10-11T11:21:42Z")

</div>

If you are using a LDR as receiver you will get integers or floats on your analog port. So why do you want to work with ascii characters?  
You can load an image with img = loadImage(“yourImage.png”); and than get the color of the pixels using the pixel array with loadPixels() and then (since you are working with LDR meaning black and white) get the brightness of the color with brightness©.  
You can convert this to a character(ascii?), but I still do not understand why you would want this.

---

<div class="post-metadata">

**Author:** ![shonerudeetha](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@shonerudeetha](https://discourse.processing.org/u/shonerudeetha)\
**Post date:** [October 11, 2019, 2:34pm UTC](https://discourse.processing.org/t/convert-image-into-ascii-value/14602/6 "2019-10-11T14:34:18Z")

</div>

![FBB2F676-8FD5-4D5B-91A6-7BB15DD05B8D.jpg](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/a6010bd1cde21d4608bfd4566df04abe90300cd2.jpeg)

i am a beginner for processing.my project is transmitting ascii value or image through a blinking LED and recieving those ascii and image via LDR…  
But i did sending and recieving ascii value…it succeed.My transmitting arduinocode is given above…  
Dear all, now , first i want to transmiting an image .i thaught it is doing by processing.whole this transmiting part is doing with arduino + processing serial communication.  
Please write and make my code to transmit an image too.

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [October 11, 2019, 9:46pm UTC](https://discourse.processing.org/t/convert-image-into-ascii-value/14602/7 "2019-10-11T21:46:33Z")

</div>

Read [this](https://forum.processing.org/one/topic/serial-transfer-jpeg-from-arduino.html).
