โดย benzas00123 » 27/01/2020 6:10 pm
โดยวันนี้เราจะมากล่าวถึงความแตกต่างของฟังก์ชั่น thumbnail กับ
resize กันนะครับ ซึ่ง function ทั้ง 2 ตัวนี้เป็น
function ที่เกี่ยวกับการปรับขนาดภาพ แต่มันจะแตกต่างกันคือ ฟังก์ชั่น thumnail นั้นไม่ว่าจะปรับขนาดภาพเล็กหรือใหญ่ยังไงก็จะ รักษา
scale ของภาพนั้นไว้เสมอ ตัวอย่างเช่น
รูปหลัก
- Python Knowledge-1.png (374.61 KiB) Viewed 762 times
thumbnail
- Python Knowledge-2.png (30.57 KiB) Viewed 762 times
resize
- Python Knowledge-3.png (35.08 KiB) Viewed 762 times
บทความนี้หวังว่าคงจะมีประโยชน์กับ ผู้ที่สงสัยความแตกต่างระหว่าง 2 ฟังก์ชั่นนี้นะครับ
ศึกษาเพิ่มเติม
วีดีโอสอน python
เทคนิคการเขียน python
บทความแชร์ความรู้ python
Pillow library การปรับขนาดรูปภาพด้วยฟังก์ชั่น resize()
Pillow library ปรับขนาดรูปเป็นเปอร์เซ็นเพื่อนำไปใช้งานได้สะดวก
อ้างอิง
https://www.geeksforgeeks.org/python-pil-image-thumbnail-method/
https://note.nkmk.me/en/python-pillow-basic/
https://www.geeksforgeeks.org/python-pil-image-resize-method/
โดยวันนี้เราจะมากล่าวถึงความแตกต่างของฟังก์ชั่น thumbnail กับ [url=https://mindphp.com/forums/viewtopic.php?f=144&t=64623]resize[/url] กันนะครับ ซึ่ง function ทั้ง 2 ตัวนี้เป็น [url=https://mindphp.com/%E0%B8%84%E0%B8%B9%E0%B9%88%E0%B8%A1%E0%B8%B7%E0%B8%AD.html?bb_limitstart=15240&start=252]function[/url] ที่เกี่ยวกับการปรับขนาดภาพ แต่มันจะแตกต่างกันคือ ฟังก์ชั่น thumnail นั้นไม่ว่าจะปรับขนาดภาพเล็กหรือใหญ่ยังไงก็จะ รักษา [url=https://www.mindphp.com/%E0%B8%9A%E0%B8%97%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1/228-tip-gimp/6099-gimp-scale.html]scale[/url] ของภาพนั้นไว้เสมอ ตัวอย่างเช่น
รูปหลัก
[attachment=2]Python Knowledge-1.png[/attachment]
thumbnail
[attachment=1]Python Knowledge-2.png[/attachment]
resize
[attachment=0]Python Knowledge-3.png[/attachment]
บทความนี้หวังว่าคงจะมีประโยชน์กับ ผู้ที่สงสัยความแตกต่างระหว่าง 2 ฟังก์ชั่นนี้นะครับ
ศึกษาเพิ่มเติม
[url=https://www.mindphp.com/vdo-tutorial-python.html]วีดีโอสอน python[/url]
[url=https://www.mindphp.com/developer/tips-python.html]เทคนิคการเขียน python[/url]
[url=https://www.mindphp.com/forums/viewforum.php?f=144]บทความแชร์ความรู้ python[/url]
[url=https://www.mindphp.com/forums/viewtopic.php?f=144&t=64623]Pillow library การปรับขนาดรูปภาพด้วยฟังก์ชั่น resize()[/url]
[url=https://www.mindphp.com/forums/viewtopic.php?f=144&t=64332]Pillow library ปรับขนาดรูปเป็นเปอร์เซ็นเพื่อนำไปใช้งานได้สะดวก[/url]
อ้างอิง
https://www.geeksforgeeks.org/python-pil-image-thumbnail-method/
https://note.nkmk.me/en/python-pillow-basic/
https://www.geeksforgeeks.org/python-pil-image-resize-method/