haashemi.dev – Telegram
haashemi.dev
105 subscribers
38 photos
2 files
50 links
Personal channel

Contact: @Byfron
Website: https://haashemi.dev
Download Telegram
🫥 Radial Gradient implementation

🫥 It was just a simple migration, as It was already implemented here.

😡 There are still a lot of other things to do btw. it's too early to publish it as a package.

.
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥4🤡43111
🫥 Introducing Painter (WIP)

🫥 A simple RGBA image drawing package for Go

👍 I wanted to complete it and then publish it, but I like development in public more.

🧊| Repository:
https://github.com/haashemi/painter

.
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥54🤡3211
🫥 Added support for transparent colors!

🫥 Now, it takes care of its background and transparent overlay color! It merges them together first and then sets the pixel's color.

🧊 Repository:
github.com/haashemi/painter

.
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥4🤡41111
🫥 Added RenderRect

🫥 With this method, you're able to call the renderer on a specific part of the image. in this example, we drew a linear gradient at the bottom of the image with height of (1920-1200=720)px

🧊 Repository:
github.com/haashemi/painter

.
Please open Telegram to view this post
VIEW IN TELEGRAM
8🔥3🤡3111
🫥 Painter daily update

1⃣ Added FillColor
—— Renders a flat color on the image.
painter.Render(img, painter.FillColor(color.RGBA{A: 255}))
2⃣ Added Decode
—— Decodes the image with type of png, jpeg, and webp.
img, err := painter.Decode(f)
👀 Up Next: Writer

.
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥3🤡33111
🫥 How fonts actually work?

🫥 To implement the Writer in the right way, I should have some knowledge about them first.

🧊 So, I'll share interesting/useful things here.

stdlib packages:
—— x/image/font
—— x/image/font/opentype
—— x/image/font/sfnt

Docs, Articles, blogs, etc.
—— Naming table (OpenType)
—— Naming table Example
—— FreeType Glyph Conventions

🔹 This post will be edited until I start the implementation.

.
Please open Telegram to view this post
VIEW IN TELEGRAM
4🤡3👍1🔥1111
⭐️ Where are fonts stored? (mostly)

🔹 Windows: [source]
C:\Windows\Fonts

🔹 MacOS: [source]
~/Library/Fonts/
/Library/Fonts/
and some cutsom dirs? (doesn't matter)

🔹 Linux: [source]
No one knows how this shit works, but:
/usr/share/fonts
/usr/local/share/fonts
~/.local/share/fonts

.
🤡44👍2👎1111
Realtime Colors

🔹 You may already know it. But I finally used it tonight, and it's so damn good!

🪄 https://www.realtimecolors.com

.
🤡75👎1111
⭐️ TGO is now stable!

🔹| Its Bot API is now on v7.0 (which was released just ~3 hours ago!)

🔹| Almost all of its methods and types are fully documented (thanks to the contributors)

🤪| And ready to use in production!

🪄 https://github.com/haashemi/tgo
Please open Telegram to view this post
VIEW IN TELEGRAM
10👍1111
Painter is now using NRGBA

Yesterday, I've been trying to do a color conversion on some images [here]. Everything seemed to be right, except the output images. (see the example image)

After about an hour of struggling with the code, I found out that it's because of Golang's PNG encoder!

🔸 but why? Well, the Go team has already described it (way better than I possibly could) in their blog post at the end of the Colors and Color Models section.

🪄 Blogpost: https://go.dev/blog/image

🎨 Painter
5211
🐔 For some reason, we reached Level 10...

🪄 https://news.1rj.ru/str/HaashemiDev?boost
Please open Telegram to view this post
VIEW IN TELEGRAM
13642111
⚡️ Painter is getting faster!

🔹 Drawing methods will be +1.3 times faster after doing some API changes. (more details, soon)

🔹 The change is planned to be pushed within the next week. 😂

🪄 [github.com/haashemi/painter]
Please open Telegram to view this post
VIEW IN TELEGRAM
32221
⚡️ Painter v0.1.0 released!

🔹 This update came for just two reasons:
More simplicity
More performance

🔥 Release notes: [CLICK HERE]

🪄 [Painter]
Please open Telegram to view this post
VIEW IN TELEGRAM
432211111
⚡️ Painter's Writer: Soon.

🔹 Issue: [CLICK HERE]

🪄 [Painter]
Please open Telegram to view this post
VIEW IN TELEGRAM
22221
⚡️ Conic Gradient added to Painter!

🔹 Well... Yeah, the implementation of Writer has been cancelled, but Painter will still get its updates!

🔸 Its performance is the same as linear gradient; on the R9 5900HS, it is ~10ms for a single 1920x1080 image.

🔻 There are still a few small differences in the orientations compared to Adobe Photoshop, but it works for now! (I have to do research about it for sure.)

🪄 [Painter]
Please open Telegram to view this post
VIEW IN TELEGRAM
4411
⚡️ TGO v1.0.1 released!

🔹 Release notes:
https://github.com/haashemi/tgo/releases/tag/v1.0.1

🪄 [TGO]
Please open Telegram to view this post
VIEW IN TELEGRAM
5411
Bezier_curves.pdf
491.4 KB
👍 A maybe useful PDF about Bezier curves I've found at [here] from [here].
Please open Telegram to view this post
VIEW IN TELEGRAM
5111
🤪 They did it!

🪄 https://go.dev/doc/go1.22
Please open Telegram to view this post
VIEW IN TELEGRAM
6221
⚡️ TGO v1.1.0 released!

🔹 TGO's API has been updated to Bot API v7.1

🪄 [TGO]
Please open Telegram to view this post
VIEW IN TELEGRAM
6321
😼 بالاخره بازگشتیم!

👍 پس از گذروندن هزار و یک جور مسائل (IRL)، بالاخره موفق شدم بایندینگ harfbuzz رو به یک جایی برسونم!

😃 متن تصویر بالا، تماما به واسطه بایندینگ harfbuzz در زبان Go (متاسفانه CGO) نوشته شده!

😐 اگه بخوایم جزئی‌نگر تر باشیم، گرادینتِ بک‌گراند با پکیج painter انجام شده، سپس کار های مربوط به متن، فونت، shaping و حتی اجرای توابع Rasterizer (پکیج vector گو) تماما توسط harfbuzz انجام شده!!

❤️ توسعه‌ی این دو پکیج در مراحل خیلی اولیه‌ی خودشون به سر می‌برن و راه درازی تا حتی "عرضه‌ی اولیه" دارن.

🥺 با این‌حال خودم هم مشتاق خروجی نهایی‌ام و مایلم ببینم تا چه حد می‌تونم خودم رو در روند توسعه این پکیج به چالش بکشم.

.
Please open Telegram to view this post
VIEW IN TELEGRAM
1131111