Find Jobs
Hire Freelancers

PHP convert Image to RGB565, compress, show stat's and download

$30-250 USD

ปิดแล้ว
โพสต์ เกือบ 5 ปีที่ผ่านมา

$30-250 USD

ชำระเงินเมื่อส่งงาน
I am working on logic for a Microcontroller that dynamically updates a screen via UART. The screen only accepts vector based commands to fill a coordinate with a square and a filled color. The command looks like so fill x,y,h,w,<color> The PHP code I wrote so far takes the image and converts each pixel to the following format, However, there are tons of room for optimization. An idea I had was to take the image and find the most common color then set the whole screen to this color. Then find all pixel's within a given shade and make it the same color than that beings the fill command to a single command because it can then cover two squares by using the command x,y,2,1,<color>. The goal is to generate the picture with lossy compression but without extremely affecting the image and as few FILL commands as possible. During the development of these algorithms, your PHP code will need to display the before and after image and the number of FILL lines required to draw the image. The Binary data of the x,y, color will then be sent as a .bin file when requested from the .php script. It can be your own or someone else's algorithm.. just make it possible to redraw with least amount of commands Examples of algorithms are like this. Cycle through each pixel and neighboring pixels and if they are similar shade make them the same. Then find the most common color and set the background image to that color. then cycle through each pixel if it's not that background color fill in that color. The least amount of times you have to cast the fill command to drop a pixel the better the algorithm! A sample image that will be used is here [login to view URL] In this case, the large portion of the map is gray, so its best to make that shade one distinct RGB565 color then set the image of the full background to that color using a single fill command. Then cycle through each pixel and combine additional like colors to make the least amount of permutations to cast a fill command to fill a pixel or a subset of pixels. When doing this without any compression you would have to cast nearly one fill command for each pixel and would take over 5 minutes to draw a screen which is not a doable solution however there should be a simple way to go upon this. Sample PHP code to get started. <?php $img = imagecreatefromjpeg("Path to Image that is 480x272"); $width = ImageSX($img); $height = ImageSY($img); for ($y = 0; $y < $height; $y++) { for ($x = 0; $x < $width; $x++) { $c = imageColorAt($img, $x, $y); $r = ($c >> 16) & 0xFF; $g = ($c >> 8) & 0xFF; $b = $c & 0xFF; $r = $r >> 3; $g = $g >> 2; $b = $b >> 3; $oc = ($r << 11) | ($g << 5) | $b; echo ("fill $x,$y,1,1,$oc<br>"); } } ?>
รหัสโปรเจกต์: 19339774

เกี่ยวกับโปรเจกต์

5 ข้อเสนอ
โปรเจกต์ระยะไกล
ใช้งานอยู่ 5 ปีที่ผ่านมา

กำลังมองหาการสร้างรายได้ใช่ไหม?

ประโยชน์ของการประมูลกับ Freelancer

กำหนดงบประมาณและกรอบเวลาของคุณ
รับเงินจากการงานของคุณ
อธิบายข้อเสนอของคุณในภาพรวม
ลงทะเบียนและเสนอราคาฟรี

เกี่ยวกับลูกค้า

ปักธงของ UNITED STATES
Palm Desert, United States
5.0
6
ยืนยันวิธีการชำระเงินแล้ว
เป็นสมาชิกตั้งแต่ ธ.ค. 28, 2004

การยืนยันลูกค้า

ขอบคุณ! เราได้ส่งลิงก์สำหรับเครดิตฟรีให้คุณทางอีเมลแล้ว
เกิดข้อผิดพลาดขณะส่งอีเมลของคุณ กรุณาลองอีกครั้ง
โลโก้ Freelancer Thailand / ภาษาไทย ช่วยเหลือและสนับสนุน FreelancerประเภทโปรเจคการประกวดFreelancerองค์กรแพ็กเกจสมาชิกโครงการ Freelancer ชั้นแนวหน้าการจัดการโปรเจคงานในพื้นที่Photo Anywhereหน้าจัดแสดงผลงานAPI สำหรับนักพัฒนาได้รับการยืนยันDesktop App เกี่ยวกับเกี่ยวกับเราวิธีใช้งานความปลอดภัยนักลงทุนแผนผังเว็บไซต์เรื่องราวข่าวออกสื่อทีมรางวัลข่าวประชาสัมพันธ์ร่วมงานกับเรา ข้อกำหนดนโยบายความเป็นส่วนตัวข้อกำหนดและเงื่อนไขนโยบายลิขสิทธิ์ข้อพึงปฏิบัติค่าธรรมเนียมและค่าบริการหุ้นส่วนEscrow.comLoadshiftWarrior Forum แอปโลโก้ Apple App Store โลโก้ Google Play
ไม่สามารถคัดลอกไปยังคลิปบอร์ดได้ โปรดลองอีกครั้งหลังปรับเปลี่ยนการอนุญาต
คัดลอกไปยังคลิปบอร์ดแล้ว
ผู้ใช้ที่ลงทะเบียน งานที่มีการโพสต์ทั้งหมด
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
กำลังโหลดตัวอย่าง
ได้รับอนุญาตสำหรับตำแหน่งทางภูมิศาสตร์
เซสชั่นการเข้าสู่ระบบของคุณหมดอายุและคุณได้ออกจากระบบแล้ว กรุณาเข้าสู่ระบบอีกครั้ง