Advertisement:

Author Topic: A FIX for the Image Resize "white space" issue  (Read 20285 times)

wexpier

  • Newbie
  • *
  • Posts: 13
Re: A FIX for the Image Resize "white space" issue
« Reply #15 on: November 18, 2012, 08:51:21 pm »
I have tried both of these fixes and I still have had no luck, I am on 3.0.2 (latest version) for this fix

My hunch was correct.... I was able to create all three images (large, preview and thumbnail) from the same original image.

Simple fix... edit file ItemActions.php located in /oc-includes/osclass/.

On lines 1045 and 1050, change "$normal_path" to-> "$tmpName".

he lines are now on 1200 +

I'm just not sure what to do, please help :/

Matthew

wexpier

  • Newbie
  • *
  • Posts: 13
Re: A FIX for the Image Resize "white space" issue
« Reply #16 on: November 18, 2012, 09:07:57 pm »
I have found it and changed it but it didn't work for me, its around line 1200 + in /oc-includes/osclass/ItemActions.php

Matthew

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: A FIX for the Image Resize "white space" issue
« Reply #17 on: November 18, 2012, 11:39:51 pm »
Hi mathew, remember it will work only for new ads (I think)

geppylane

  • Newbie
  • *
  • Posts: 36
Re: A FIX for the Image Resize "white space" issue
« Reply #18 on: December 04, 2012, 06:42:04 pm »
Hi mathew, remember it will work only for new ads (I think)

i Frosticek

i tried it in the v. 3.0.2
in the file ItemActions.php there are 4 occourrencies of $normal_path so i changed all to $tmpName
but when i submit a new ad uploading images and press the publish button i get a white page. then going to admin i find the ad in pending status but the images have not been uploaded. if i look at the ad page i can see that the link to the image to display is not correct. it is mysite.org/21.

any idea?

:)  thanks


mmcsus

  • Hero Member
  • *****
  • Posts: 704
  • Open Source
Re: A FIX for the Image Resize "white space" issue
« Reply #19 on: December 04, 2012, 07:09:55 pm »
Hi mathew, remember it will work only for new ads (I think)

i Frosticek

i tried it in the v. 3.0.2
in the file ItemActions.php there are 4 occourrencies of $normal_path so i changed all to $tmpName
but when i submit a new ad uploading images and press the publish button i get a white page. then going to admin i find the ad in pending status but the images have not been uploaded. if i look at the ad page i can see that the link to the image to display is not correct. it is mysite.org/21.

any idea?

:)  thanks

  I have seen this problem when your upload dir has the wrong permissions.

geppylane

  • Newbie
  • *
  • Posts: 36
Re: A FIX for the Image Resize "white space" issue
« Reply #20 on: December 04, 2012, 09:36:44 pm »
Hi mathew, remember it will work only for new ads (I think)

i Frosticek

i tried it in the v. 3.0.2
in the file ItemActions.php there are 4 occourrencies of $normal_path so i changed all to $tmpName
but when i submit a new ad uploading images and press the publish button i get a white page. then going to admin i find the ad in pending status but the images have not been uploaded. if i look at the ad page i can see that the link to the image to display is not correct. it is mysite.org/21.

any idea?

:)  thanks

  I have seen this problem when your upload dir has the wrong permissions.

the uploads folder has the 755

which should it be?

mmcsus

  • Hero Member
  • *****
  • Posts: 704
  • Open Source
Re: A FIX for the Image Resize "white space" issue
« Reply #21 on: December 04, 2012, 09:55:11 pm »
Just for grins try 777

Kittin

  • Full Member
  • ***
  • Posts: 181
Re: A FIX for the Image Resize "white space" issue
« Reply #22 on: January 21, 2013, 11:47:38 am »
Same as geppylane, I have tried with 755 uploads folder, it doesn't work, uploading a new ad with a new picture. After, I re-tried with 777 uploads folder, it doesn't work, uploading a new ad with a new picture.

I have a white page with error.. I use osclass 3.0.2

loverlobster

  • Jr. Member
  • **
  • Posts: 51
Re: A FIX for the Image Resize "white space" issue
« Reply #23 on: January 27, 2013, 02:27:18 pm »
I would like to hear what is the optimal solution for this as I can read from the thread multiple solutions and with problems.

My main concern is the big amount of white space around photos in the item page and latest listings too.

zombie

  • Sr. Member
  • ****
  • Posts: 376
Re: A FIX for the Image Resize "white space" issue
« Reply #24 on: January 27, 2013, 02:30:52 pm »
My main concern is the big amount of white space around photos in the item page and latest listings too.

same

Pratik Maniar

  • Newbie
  • *
  • Posts: 44
Re: A FIX for the Image Resize "white space" issue
« Reply #25 on: February 04, 2013, 01:20:20 pm »
My hunch was correct.... I was able to create all three images (large, preview and thumbnail) from the same original image.

Simple fix... edit file ItemActions.php located in /oc-includes/osclass/.

On lines 1287 and  1292, change "$normal_path" to-> "$tmpName".

Thank You,
Pratik Maniar

zombie

  • Sr. Member
  • ****
  • Posts: 376
Re: A FIX for the Image Resize "white space" issue
« Reply #26 on: February 04, 2013, 01:21:44 pm »
My hunch was correct.... I was able to create all three images (large, preview and thumbnail) from the same original image.

Simple fix... edit file ItemActions.php located in /oc-includes/osclass/.

On lines 1287 and  1292, change "$normal_path" to-> "$tmpName".

Thank You,
Pratik Maniar

This only reduces the whitespace and removes the watermark. Not what I need. Thanks!

geo78

  • Full Member
  • ***
  • Posts: 100
Re: A FIX for the Image Resize "white space" issue
« Reply #27 on: March 29, 2013, 07:21:44 pm »
I have zoomed the thumbnails to hide the whitespace, couldnt find anything better.

What i have done in main.php and searchlist.php:

put image thumbnail into a div with class="thumbrez"

like

<a href="<?php echo osc_item_url() ; ?>">
                                                    <div class="thumbrez"><img src="<?php echo osc_resource_thumbnail_url() ; ?>" width="100px" height="80px" title="" alt="" /></div>
                                                </a>

ans add the folowing css in style.css

.thumbrez {width:100px;
     height:80px;
     display:block;
     position:relative;
     overflow:hidden;  border: 1px solid #CCCCCC;}
     
 .thumbrez img
    {    height: 160%;
    left: -25px;
    position: absolute;
    top: -25px;
    width: 160%;
     }   

if you have different width and height of image sizes you have to adjust the css settings

i have also set in Admin
Image sizes

The sizes listed below determine the maximum dimensions in pixels to use when uploading a image. Format: Width x Height.
Thumbnail size 200x200

also edit file ItemActions.php located in /oc-includes/osclass/.

On lines 1287 and  1292, change "$normal_path" to-> "$tmpName".


George

zombie

  • Sr. Member
  • ****
  • Posts: 376
Re: A FIX for the Image Resize "white space" issue
« Reply #28 on: March 29, 2013, 07:25:58 pm »
Nice! But let's try to mod the image resizer php script.to do it. I will try these days.

Aficionado

  • Guest
Re: A FIX for the Image Resize "white space" issue
« Reply #29 on: March 30, 2013, 12:51:56 am »
This is actually one of the mysteries Osclass has.

A so simple thing as proper resizing, standard in ALL web applications, for Osclass is hard to do/fix.

 :(