Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "imagemagick"
-
I realize I've ranted about this before, but...
Fuck APIs.
First the fact that external services can throw back 500 errors or timeouts when their maintainer did a drunk deploy (but you properly handled that using caching, workers, retry handlers, etc, right? RIGHT?)...
Then the fact that they all speak a variety of languages and dialects (Oh fuck why does that endpoint return a JSON object with int keys instead of a simple array... wait the params are separated with pipe characters? And the other endpoint uses SOAP? Fuck I need to write another wrapper class around the client...)
But the worst thing: It makes developers live in this happy imaginary universe where "malicious" is not a word.
"I found this cloud service which checks our code style" — hmm ok, they seem trustworthy. Hope they don't sell our code, but whatever.
"And look at this thing, it automatically makes database backups, just have to connect to it to DigitalOcean" — uhhh wait...
"And I just built this API client which sends these forms to be OCR processed" — Fuck... stop it... there are bank accounts numbers on those forms... Where's that API even located? What company?
* read their privacy policy *
"We can not guarantee the safety of your personal data, use at your own risk [...] we are located in Russia".
I fucking hate these millennial devs who literally fail to get their head out of the cloud.
Somehow they think it's easier to write all these NodeJS handlers and layers around some API, which probably just calls ImageMagick + Tesseract on the other side.
If I wasn't so fucking exhausted, I'd chop of their heads... but they're like hydra, you seal one privacy breach and another is waiting to be merged, these kids just keep spewing their crap into easy packages, they keep deploying shitty heroku apps... ugh.
😖8 -
I'm a student, so this isn't exactly the same.
I once created a Flask application for some coursework. It was basically an Instagram clone. Anyway, when it came to handling images and saving them, I used an import called ImageMagick. Now the issue is, it had to run in Levinux (which is shit). The problem was that ImageMagick was a Debian, and Levinux only used TCZ (Tiny Core Extension or something,) so I spent a literal three days trying to convert the library into a .tcz, only to find out that Flask's built in image manager worked perfectly and reduced my code by about 25%.4 -
ffmpeg...
I FUCKING LOVE YOU!!
I CAN JUST STACK THOSE FILTERS WITH NO RESTRICTIONS OVER AND OVER WITH DIFFERENT INPUTS AND OUTPUTS!!
Also: it fucking works with still images, AND IT’S FUCKING FAST!!
It’s around FOUR (4, DO YOU REALISE THE IMPROVEMENT) times faster to GAUSSIAN blur an image and then composite an image over it with ffmpeg, than to composite the image with imagemagick (no blurring)!!3 -
"Why are you late?" "Because I patched the CVE in Imagemagick on all of our servers tonight." "Next time be on time!" *sigh*2
-
Client complains constantly over image quality.
Then continues to upload diagrams as jpg not as png and then is bothered about compression artifacts...
It also doesnt help he works on a retina screen and we had to migrate his tiny thumbnail images from his old website.
Maybe I should buy a microscope... Or maybe send him the imagemagick documentation and he can choose the parameters to his liking? -
Making me happy is like optimising an image for the web.
Just strip me, interlace me and give me a sampling factor of 420 😂 -
My new passion in life is to spend a whole morning trying to figure out why I can't create a thumbnail with node-imagemagick, only to discover that I forgot an 's' to the output directory.
FUCK. ME.2 -
Just TYPO3 things:
in your config constants doing "styles.content.textmedia.maxWInText = 450" should basically crop all your images to a maximum width of 450 using ImageMagick except TYPO3 flips it's shit and won't do it.
After about an hour or so of debugging and guessing around with 2 other developers setting "styles.content.textmedia.maxWInText" to "500" will actually work. Every other number except 450 works.
Using TYPO3 is like preparing for hell.1 -
I'm creating a bitmap font right now and wanted to automatically generate a image with some text so I can track my progress how it looks. gnome-font-viewer displays it fine, but it'd nothing compared to some real text. Well, how hard can it be?
First attempt: Use ImageMagick to create an image and draw some text. I found a forum post in the ImageMagick forums from 2017 claiming incorrect rendering of BDF fonts, which was promised to be fixed. Yet convert does exactly nothing besides saying “couldn't read font”.
Looking around, there is exactly one tool for the job I'm looking to get done: pbmtext. It works, but doesn't support Unicode. Egh.
Maybe I could write a short script to do it, then? Python's Pillow can import Bitmap fonts (cairo can't). Halfway done I notice it can't deal with anything outside of the character range 0..256.
Using FreeFont directly is out of the question as that seems to be equally much work as creating the font in the first place. I briefly tried SDL, but the font formats it understands are limited.
So how about converting the font then, you ask? Everyone seems to be only concerned about the other way (like OTF to BDF). I tried loading the font into FontForge and exporting an OTF or TTF but couldn't get anything out of it that ImageMagick recognizes as a font.
It seems fucking impossible to render text to an image with an Unicode BDF font in some automated way.
To add insult to injury, my searches containing “bdf” are always interpreted as with “pdf”. I'm not even a Franconian, I can distinguish B and P!4 -
Ffs debian, y u no imagemagick >= 7, it's been around for a lot of years now. Time to unnecessarily complicate my pipeline10
-
Just wanted to do some scripted image resizing for school in school because the teacher asked me to help her with that.
So I thought: Let's just write a tiny script. Written the script in almost no time (just iterates over all jpg's and resizes them)
30sec.
Now I tried to run it. Didn't have my laptop so I had to somehow run it on their windows PCs. At least it's windows 10, unlike other schools that still run XP and stuff so I thought it might be doable. Well guess what, nope it wasn't.
First tried to install imagemagick, that didn't work as only teacher accounts have admin and the teacher was already pretty scarred once he saw me doing stuff in powershell so I thought I'd better not ask to do this via a teacher account and mess with stuff as admin.
Next method: Installing msys2. That worked at least (after taking forever to install and having to mess with the av software to get it to run).
And there comes the next problem: pacman doesn't connect via the proxy so I can't download any packages. There is free wifi but only for teachers, and students aren't going to get access until the school finally has a faster connection because they'd (understandably) cause this connection to be constantly overloaded. I just happen to have access to this wifi network, too, because at least the guys from the IT dept know how bad using proxies under linux is. So I connect via wifi and it works. At least I thought: After running the script it yields weird errors about unsupported arguments even though the command is exactly the same I have been using for years (already checked typos twice)
Then got the idea of simply installing imagemagick on termux on android and transferring the files onto my phone.
Too bad we aren't allowed to attach our own USBs to the pcs. Luckily I got a rooted phone so I simply activate adb over network and connect to it.
After downloading the platform-tools I can't run them because of AV software. Luckily there is an option to add an exception per executable so I do that. After doing that it works.... nope it doesn't. The wifi only allows 443/tcp and 80/tcp, even for internal network devices.
So that's it. I'm simply going to upload that stuff to my nextcloud and convert it at home.
Windows, I hate you!!!2 -
//not a rant, just a question
Yeah I know SO is the place to ask such stuff, but I still wanna ask it here.
I have started with OpenCV for image processing. The sad thing is it is available for python only. Is there a PHP alternative? The best I have found is ImageMagick which doesn't come close to OpenCV.