Jump to content

Changing the white of cropped images to purple


respectwomen

Recommended Posts

Hi, I'm using a dark theme with 1.7.4.2 and I have a lot of jpg images of different size ratios that I import via csv. Problem is when I import them they get cropped with white borders around them due to the different sizes. Is there somewhere I can modify to change the image handler to make the crop color #220c2b which is my background color instead of white? Then it would blend in nicely.

Thanks,

Jared

Link to comment
Share on other sites

Hello,

I think could be possible, in the "/classes/ImageManager.php" try changing the line: $white = imagecolorallocate($destImage, 255, 255, 255);
To: $white = imagecolorallocate($destImage, 34, 12, 43);

I have not tested yet, but checking the code seems to be the part where it assign the background color.

 

Regards!

Link to comment
Share on other sites

Thanks Rolige I will try that and report back

2 hours ago, Rolige said:

Hello,

I think could be possible, in the "/classes/ImageManager.php" try changing the line: $white = imagecolorallocate($destImage, 255, 255, 255);
To: $white = imagecolorallocate($destImage, 34, 12, 43);

I have not tested yet, but checking the code seems to be the part where it assign the background color.

 

Regards!

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...