horst Posted June 23, 2020 Author Share Posted June 23, 2020 2 hours ago, Crowdland Technology said: Tried to enable webp support and get this error: Hi, PIM doesn't have webP support. It was written years before webP support comes into core, and it needs to be completly rewritten. (I also have started 2-3 times, but far from finishing. No time for it 😞 ) You may use a (clumpsy) workaround. First create a watermark image with 100% quality an sharpening = none, and then finally pass it through the core width() or size() function. This way you can use what ever webp strategy you like as it is always delegated to the core image handling. Downside is one additional (intermediate) variation in the chain. $options = ['sharpening'=>'none', 'quality'=>100]; $image_intermediate = $prop->images->eq(0)->pim2Load("wtm",true, $options)->height(480)->watermarkLogo($watermark, $position='center', $padding=2)->pimSave(); $image_url = $image_intermediate->height($image_intermediate->height)->url; // saves the image with 480px height, but with all default settings for quality, sharpening, webP, etc. 1 Link to comment Share on other sites More sharing options...
adrian Posted November 13, 2020 Share Posted November 13, 2020 Hi @horst - my first time using this, so sorry if this is a dumb question, but why is the text outlined rather than solid? I don't understand how to get it more legible. Is it also possible to specify the font color and perhaps also the font itself (also this is less important). Also, the "true" after the prefix doesn't seem to work - I need to keep changing the name "watermark" to something else to get it to update the image with my new settings. Am I doing that correctly? Thanks. Link to comment Share on other sites More sharing options...
horst Posted November 13, 2020 Author Share Posted November 13, 2020 12 hours ago, adrian said: but why is the text outlined rather than solid? I don't understand how to get it more legible. Is it also possible to specify the font color and perhaps also the font itself (also this is less important). This was a try to automatically detect the colors and hue and create a grayscale watermark text. A full file path to a TTF-fontfile can be passed as param to the function. Here you can read about the function in general: Link to comment Share on other sites More sharing options...
adrian Posted November 13, 2020 Share Posted November 13, 2020 2 hours ago, horst said: This was a try to automatically detect the colors and hue and create a grayscale watermark text Would you be ok with accepting a PR that allows an option to simply provide a solid font color? Also still curious about the $forceRecreation boolean not working - am I doing that wrong? Thanks. Link to comment Share on other sites More sharing options...
horst Posted November 13, 2020 Author Share Posted November 13, 2020 3 hours ago, adrian said: Would you be ok with accepting a PR that allows an option to simply provide a solid font color? Yep!!! 🙂 3 hours ago, adrian said: Also still curious about the $forceRecreation boolean not working - am I doing that wrong? I'm not sure. Maybe I haven't use this function in the last 5 years. I will try to look at it in the next days. Link to comment Share on other sites More sharing options...
StanLindsey Posted February 1, 2021 Share Posted February 1, 2021 Does pim2 support progressive/interlaced JPEGS? Link to comment Share on other sites More sharing options...
horst Posted February 1, 2021 Author Share Posted February 1, 2021 8 hours ago, StanLindsey said: Does pim2 support progressive/interlaced JPEGS? Now it does. 🙂 Here you go: https://github.com/horst-n/PageImageManipulator 2 1 Link to comment Share on other sites More sharing options...
MSP01 Posted April 13, 2021 Share Posted April 13, 2021 It's a little thing, but would it be possible to create images without the .-pim2- part? Currently: original.jpg becomes: original.-pim2-prefix.jpg I'd prefer if it became: originalprefix.jpg 1 Link to comment Share on other sites More sharing options...
B3ta Posted June 2, 2021 Share Posted June 2, 2021 On 4/13/2021 at 2:51 PM, MSP01 said: It's a little thing, but would it be possible to create images without the .-pim2- part? Currently: original.jpg becomes: original.-pim2-prefix.jpg I'd prefer if it became: originalprefix.jpg I would like to have that feature too! Link to comment Share on other sites More sharing options...
jploch Posted February 15 Share Posted February 15 Hi! This is a really useful module. I use it to combine some graphics with the watermark option. However today a host of my client updated to PHP 8 und I got a fatal error: Exception: Cannot load the MemoryImage! After donwgrading to PHP 7.4. everything worked again. The host told the client they will switch to PHP 8 next year and only offer paid support for older versions, so it would be nice if I can continue to use this module. Are there any plans to support PHP 8 in the future? 1 Link to comment Share on other sites More sharing options...
horst Posted February 15 Author Share Posted February 15 1 hour ago, jploch said: Are there any plans to support PHP 8 in the future? I will check and update it when I have installed a local php 8 environment. So do not expect it in the next weeks. But definetly get updated to php 8. 1 Link to comment Share on other sites More sharing options...
horst Posted February 15 Author Share Posted February 15 @jploch Ok, seems to be fixed. I haven't bumped the modules version number in PWs modules system now. Please manually (FTP) update these two files:https://github.com/horst-n/PageImageManipulator/blob/master/PageImageManipulator02.modulehttps://github.com/horst-n/PageImageManipulator/blob/master/ImageManipulator02.class.php If you can try it out and report back, this would be fine. Also on github was a issue report from @Craig with a fix! (Thanks 🙂 ) Haven't seen this, as I train to use git from the command line for the last month. 😄 1 Link to comment Share on other sites More sharing options...
jploch Posted February 23 Share Posted February 23 @horst THX for the quick fix! Unfortunately my client already made the change to PHP 7.4. and I do not have a php 8 environment to test this at the moment. I will report back once I setup a local test environment. 1 Link to comment Share on other sites More sharing options...
Sevarf2 Posted June 8 Share Posted June 8 Hello, I'm trying to put a watermark text on top of my image but I got strange result as you can see...any idea why the font is rendered like that? I'm using a simple Roboto font. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now