Graphics settings and/or image use. change linkage from folder var/resizes to var/albums.

slart

Joined: 2013-11-11
Posts: 112
Posted: Sun, 2013-11-24 19:41

Hi,
it's possible, that i arrange the images other?

I will, that my images not to process with the graphics programs, except thumbs. And the thumbs save as progressive jpeg. I will my original photos use in the gallery mode.

I'm don't use the "Full size" feature and process all of my photos in my computer.

Don't resize my images or save it new/double!

That's besides a question fot the webstorage.

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Wed, 2013-11-27 14:38

I had the idea of ​​a redirect via .htaccess. But the web host supports the "Option" not (Options + FollowSymLinks).
Does anyone have a similar idea?

Another Idea:

I have the GD driver found.
/system/libraries/drivers/Image/GD.php
How can there be >newly rewritten in /resizes and /albums< to >copy original in /resizes and /albums< in the function save the original?

Or can the inviolable copy is written in a different place?

OK, I have the opportunity, after the upload, share files with my. But this is very expensive.

Another problem is the web host supports "exec" is not, so I can not use ImageMagick or GraphicsMagick.

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Thu, 2013-11-28 17:21

No answer? :/

I'm looking for a solution that only one storage location for the photos is needed in /var.
It is not optimal if the memory space is doubled. The 10Gb of photos by Gallery3 be 20Gb. 20Gb -> 40Gb, 40 -> 80, ... This is too much for my purposes. I like Gallery3, but that does'nt.

How can I, for example, to redirect all references to the folder /var/resizes to the folder /var/albums?

I have only found the entry "image_url", but not the associated reference. Where can I change the url to the photos?

Another possibility would be that Cooliris photos not available from /var/albums, but /var/resizes. In addition still remove the button to Fullsize in the infobox, I do not need anyway, the maximum size is already displayed, and all would be well.

But, I find nothing to where I could adjust that.

Please help me.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2013-11-28 21:41

If you want to get rid of the resized version you would have to edit the theme you are using and manually delete the resized image.
http://galleryproject.org/node/103837
G3 was designed to have 3 images for each item. Original, thumb, and resize. If you want it different you will have to dig though the code to chnage the behaviour to your desire.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Fri, 2013-11-29 08:27

Big thanks floridave! And realy big thanks to DixitSs Brother! That is was i have search. :)

OK, it's not 100%. Because, I have Dark Canvas Theme Wide. A bit different, but it works. Here is how to do:

open:
gallery3/modules/gallery/models/item.php

change on line 723 to 737:
/**
* Return an <img> tag for the full image.
* @param array $extra_attrs Extra attributes to add to the img tag
* @return string
*/
public function full_img($extra_attrs) {
$attrs = array_merge($extra_attrs,
array("src" => $this->file_url(),
"alt" => $this->title)
);
// html::image forces an absolute url which we don't want
return "<img" . html::attributes($attrs) . "/>";
}

save and close.

open:
gallery3/themes/greydragon/views/photo.html.php

change on line 20:
replace:
<?= $item->resize_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>
with:
<img src="<?=$item->file_url()?>">

change on line 42:
replace:
<?= $item->resize_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>
with:
<?= $item->full_img(array("id" => "g-photo-id-{$item->id}", "class" => "g-resize", "alt" =>$_title)) ?>

save and close.

Note: Just, now can delete the subfolder in var/resizes. Every delete uploaded after new photos. DON'T delete the folder var/resizes!

have fun!

PS: In the folder var/albums are not the originals (copy), but newly saved originals. That's not fine.
I've noticed that because they are now not-progressive jpeg more. :(
OK, I can share this files in /var/albums with my. That's not such a big problem, just more work.

(sorry for my english, i have never learn this realy.) Google Translate and Leo.org is my little friend in this. ;)

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Wed, 2013-12-04 20:40

Hi!
I've noticed something strange. If I make the browser narrower, then the photos are compressed and are no longer in 4:3 landscape or 3:4 portrait format, but in the height once narrower once longer. In width they fit on the page width. See the screenshots in the attachement.

Zwischenablage04.jpg = portrait 3:4 photo in compressed browser page width
Zwischenablage02.jpg = landscape 4:3 photo in full page width
Zwischenablage03.jpg = landscape 4:3 photo in compressed browser page width

PS: Sorry for the wrong information in the last post. That was a mistake on my part. The original photos will not resaved by GD Graphics. The Resizes retain settings, such as "progressive" if they have the right size for Resizes were before. If the photos are stored on the PC in "progressive", so they retain the case.

 
slart

Joined: 2013-11-11
Posts: 112
Posted: Thu, 2013-12-05 08:23

OK, i found the mistake in the gallery3/themes/greydragon/views/photo.html.php

It is a bit different in Dark Canvas Theme with wide mode.

Not Exchange the lines described above, but as described here in the photo.html.php:

open:
gallery3/themes/greydragon/views/photo.html.php

exchange on line 20:
replace:
<?= $item->resize_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>
with:
<?= $item->full_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>

exchange on line 42:
replace:
<?= $item->resize_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>
with:
<?= $item->full_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>

PS: Only exchange "resize_img" -> "full_img" in the lines.