Merge images only vertically or horizontally

Bug #347610 reported by Gauri
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CSS Sprite Generator
Status tracked in Trunk
Trunk
Fix Released
Medium
Unassigned

Bug Description

I want to merge images which repeat in x direction. Therefore all my merged images should be only in vertical direction. Looks like this sprite generator does not provide this option.

Revision history for this message
Ed Eliot (ejeliot) wrote :

Yes, that's correct at present. I'll look into the feasibility of extending to support this. Out of interest why do you need it to repeat that way?

Revision history for this message
Gauri (gaurik) wrote : Re: [Bug 347610] Re: Merge images only vertically or horizontally

I have some images eg. some background images for some gradient effect which
i want to merge together. We set those images as bacgkround images repeating
in x or y direction to achieve some UI effect.

thanks
Gauri

On Mon, Mar 23, 2009 at 3:56 PM, Ed Eliot <email address hidden> wrote:

> Yes, that's correct at present. I'll look into the feasibility of
> extending to support this. Out of interest why do you need it to repeat
> that way?
>
> --
> Merge images only vertically or horizontally
> https://bugs.launchpad.net/bugs/347610
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in CSS Sprite Generator: New
>
> Bug description:
> I want to merge images which repeat in x direction. Therefore all my merged
> images should be only in vertical direction. Looks like this sprite
> generator does not provide this option.
>

Revision history for this message
Denys Mishunov (mishunov) wrote :

Was about adding the new feature request, but since this ticket is here already, the nI will add to it.

I think there should be a switcher that would let you to choose whether to merge images vertically, horizontally or automatically.

Vertical - useful when you want to merge background images, that should be repeated by Y axis.
Horizontal - useful when you want to merge background images, that should be either repeated by X axis or should not be repeated at all.
Automatically - would work as it does at the moment - generator chooses how to merge images by itself.

Right now I can't merge images that should be repeated along the Y axes - generator puts every image on the new row for me which means I can't repeat images along the Y and should either do it manually or not use sprite for such images.

Thank you.
Denys

Revision history for this message
Felix Zweig (f.zweig) wrote :

Would it be possible to test the orientation of the images and decide whether they should be aligned horizontally or vertically? If there are only images which are higher then wide (or almost squarish), the should be be aligned vertically, otherwise (== wider than high; and if they are only a few pixels high), they should be aligned horizontally.

With this, it would be possible to have images with repeat-x and with repeat-y in one sprite.

Revision history for this message
Denys Mishunov (mishunov) wrote :

I am not sure I agree with kwurzel.

First - this kind of analysis is doomed to be buggy. You never can guess what users can do with the images. So I am sure there will be cases when this analysis will not work properly.

Second - "images which are higher then wide (or almost squarish), the should be be aligned vertically" doesn't make sense to me. Actually it should work the other way around - you don't make high images to repeat along Y-axes. You rather make them not high at all - about a couple of pixels high since they will be repeated along Y anyway. And of course you want to merge vertically exactly in case you are merging images, that should be repeated along the Y. And thus we have a conflict if you get what I mean.

I would much rather want to see this type of control in the UI for users to be able to select the merging if they know what they are doing or keep "Automatically" (that should be the default option) if they don't really care about how their images are merged or if they are about merging not-repeated images.

Revision history for this message
Ed Eliot (ejeliot) wrote :

My plan is to add a select box with Horizontal or Vertical (with the default being Vertical). I'm not sure what benefit automatic detection would bring.

Revision history for this message
Denys Mishunov (mishunov) wrote :

Sounds great! Thanks Ed!

Concerning automatic. I proposed this since I am not sure how you merge images now and what logic is behind it, since I have managed to get sprites with only horizontal merging and mixed merging when small (short) images were placed on the same row, while the larger (longer) images have been placed on a separate line. So, that's why I have proposed to have automatic, since this might be useful if you have some internal logic for decisions about how to merge images.

But if you are going to have only either vertical or horizontal merging then it's even better - UI will be more clear for end-users without need of extra thinking what 'automatic' should mean.

Great work Ed, keep going!

Revision history for this message
Gauri (gaurik) wrote :

Having a selection box sounds good.

thanks
Gauri

On Sun, Apr 12, 2009 at 2:17 AM, spliter <email address hidden> wrote:

> Sounds great! Thanks Ed!
>
> Concerning automatic. I proposed this since I am not sure how you merge
> images now and what logic is behind it, since I have managed to get
> sprites with only horizontal merging and mixed merging when small
> (short) images were placed on the same row, while the larger (longer)
> images have been placed on a separate line. So, that's why I have
> proposed to have automatic, since this might be useful if you have some
> internal logic for decisions about how to merge images.
>
> But if you are going to have only either vertical or horizontal merging
> then it's even better - UI will be more clear for end-users without need
> of extra thinking what 'automatic' should mean.
>
> Great work Ed, keep going!
>
> --
> Merge images only vertically or horizontally
> https://bugs.launchpad.net/bugs/347610
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in CSS Sprite Generator: New
>
> Bug description:
> I want to merge images which repeat in x direction. Therefore all my merged
> images should be only in vertical direction. Looks like this sprite
> generator does not provide this option.
>

Revision history for this message
Stuart Colville (muffinresearch) wrote :

Change this to in-progress as new release is coming with this functionality in the not too distant future.

Changed in css-sprite-generator:
importance: Undecided → Medium
status: New → In Progress
Changed in css-sprite-generator:
milestone: none → 4.0
Revision history for this message
Stuart Colville (muffinresearch) wrote :

Check out version 4.0 which now supports this feature.

Revision history for this message
Denys Mishunov (mishunov) wrote :

Thanks a lot for implementing this Stuart!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.