I need to change the small image size on Magento community.
HereĀ“s why, it does not fit the global product window.
link here
I tried at \app\design\frontend\default\magik_pinstyle\template\catalog\product\list.phtml
and flushed the image cache but I does not work.
I can see it`s a 265px image but when I search for a resize(265) I dont find anything.
This would actually be located in app/design/frontend/default/magik_pinstyle/template/catalog/product/view/media.phtml. Copy the file over from app/design/frontend/base/default/template/catalog/product/view/media.phtml if you don't have it on your template. On line 68 (in the base media.phtml) you'll find this line:
$_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" itemprop="image" />';
Your photos don't fit the frame because your .product-view .product-img-box .product-image CSS is set to 320x300px (width/height). If you want your pictures to fit, you need to make sure the resize is set to the same size of the frame, and you should probably square off your frame.
If you want the larger frame, change your image CSS to 320x320px or 300x300px and change the above line to resize(320) or resize(300), respectively.
If you want to keep the 265x265px image size, change your image CSS to 265x265px and leave it as is.
Edit
It is still using a file in 265x265px resize cache.
You should deliberately clear out everything in your /media/catalog/product/cache folder, first the media.phtml checks to see if a resize already exists and falls back to that. If one isn't found, then it runs the resize.
You are editing the file found in app/design/frontend/default/magik_pinstyle/template/catalog/product/view/media.phtml, correct? If altering the existing resize function doesn't work after completely emptying the cache you can add the ->resize(300) function to line 15:
$this->helper('catalog/image')->init($_product, 'image')->resize(300)
Lastly, if you have a custom lightbox or theme section in your settings, check for anything you may have missed to alternately set dimensions.
Make sure to refresh your cache, you should clear your image cache too.
I know that this is an old post but but I want to add something that seems to be left out off most of these responses, you must enlarge the container that the image is contained in otherwise the image will not be enlarged.
I followed the first part of Jason's answer above by going into
app/design/frontend/default/magik_pinstyle/template/catalog/
/view/media.phtml. Copy the file over from app/design/frontend
/base/default/template/catalog/product/view/media.phtm
and changing line 32 and 33 to
$bigImageX = 608; from $bigImageX = 308;
$bigImageY = 608; from $bigImageY = 308;
and nothing happened after flushing of the cache both magento nor browswer.
I then went into dev tools and enlarged the width of
<div class="produt-img-box">
which increased the size of the image to my desired size.
Just to be clear, I also had to shrink the size of the
<div class="product-shop"> to totally accomplish my goal of resizing the image.
Related
So, I have a growing string with many "\n". Every app start I will load the total string and every app use some new lines will be added.
The string is inside the Content of a ScrollView. But the Content size is not scaling with the string length. I want the Content to be exactly as high as the text lines go and be scrollable.
I can think of calculating the line count and set the content height manually. But maybe there is a more simple way? Please tell me your solutions.
I found a convenient non-code answer myself. You put the Text-Component directly on your Content GameObject. Then you use a ContentSizeFitter and set Vertical: Preferred. Also the Content anchors have to be set for variable height.
This enables me to dynamically set and scroll through a different text length with a ScrollView. (The font size is kept, to still fit the rest of the GUI)
I am still open for other answers.
I created a .PDF file using Adobe Acrobat Pro. The file has several text fields. Using iTextSharp, I'm able to populate all the fields and mail out the .PDF.
One thing is bugging me - some of the next will not "fit" in the textbox. In Adobe, if I type more that the allocated height, the scroll bar kicks in - this happens when font size is NOT set to auto and multi-line is allowed.
However, when I attempt to set the following properties:
//qSize is float and set to 15;
//auto size of font is not being set here.
pdfFormFields.SetFieldProperty("notification_desc", "textsize", qSize, null);
// set multiline
pdfFormFields.SetFieldProperty("notification_desc", "setfflags", PdfFormField.FF_MULTILINE, null);
//fill the field
pdfFormFields.SetField("notification_desc", complaintinfo.OWNER_DESC);
However upon compilation and after stamping, the scroll bar does not appear in the final .PDF.
I'm not sure if this is the right thing to do. I'm thinking that perhaps I should create a table and flood it with the the text but the documentation makes little or no reference to scroll bars....
When you flatten a document, you remove all interactivity. Expecting working scroll bars on a flattened form, is similar to expecting working scroll bars on printed paper. That's why you don't get a lot of response to your question: it's kind of absurd.
When you fill out a rectangle with text, all text that doesn't fit will be omitted. That's why some people set the font size to 0. In this case, the font size will be adapted to make the text fit. I don't know if that's an option for you as you clearly state that the font size must be 15 pt.
If you can't change the font size, you shouldn't expect the AcroForm form field to adapt itself to the content. ISO-32000-1 is clear about that: the coordinates of a text field are fixed.
Your only alternative is to take control over how iText should fill the field. I made an example showing how to do this in the context of my book: MovieAds.java/MovieAds.cs. In this example, I ask the field for its coordinates:
AcroFields.FieldPosition f = form.GetFieldPositions(TEXT)[0];
This object gives you the page number f.page and a Rectangle f.position. You can use these variables in combination with ColumnText to add the content exactly the way you want to (and to check if all content has been added).
I hope you understand that:
it's only normal that there are no scroll bars on a flattened form,
the standard way of filling out fields clips content that doesn't fit,
you need to do more programming if you want a custom result.
For more info: please consult "iText in Action - Second Edition".
Is there a way to get larger, non-thumbnail image for a link object? For example, given the link object https://graph.facebook.com/344600782244586, how can I get something larger than the thumbnail?
https://graph.facebook.com/344600782244586/picture does not work. It gives me the error "No node specified". Which means I can't use the type parameter.
The link object has a picture property with a value of http://external.ak.fbcdn.net/safe_image.php?d=AQAjeHBmdhzmBYB7&w=90&h=90&url=http%3A%2F%2Ftctechcrunch2011.files.wordpress.com%2F2012%2F03%2Fgf.jpg%3Fw%3D150. That will give me the thumbnail. I've tried just playing with the w and h values, but then Facebook just returns a 1x1 GIF.
My current approach is to pull out the url parameter and use that, but I'm wondering if there is a FB approach I can use.
seems there is a new "full_picture" field to ask for:
/posts?fields=full_picture
note that it's still not referenced, so I don't know if it's working at 100% and seems to be great for links but not pictures.
I personally combines 2 solutions:
if link I use full_picture field
<img src="[full_picture]" />
if picture (after asking for object_id field /posts?fields=object_id ) simply:
<img src="https://graph.facebook.com/[object_id]/picture" />
I kind of found a hack way to get the larger pic. If your image url ends in "_s.jpg", just replace the "_s" with "_b" and voila. Its a hack, that may not work tomorrow, but for now, it
does.
See below:
Small pic vs Big Pic
From the graph api
https://developers.facebook.com/docs/reference/api/
You can specify the picture size you want with the type argument, which should be one of square (50x50), small (50 pixels wide, variable height), normal (100 pixels wide, variable height), and large (about 200 pixels wide, variable height): https://graph.facebook.com/[INSERT ID HERE]/picture?type=large.
Need a bit more help please...
I need to display 24 times :
or
or
(depending on speed/duplex on the port)
But those images have to be displayed in the switch's image :
How to do to get all images well formated ??
To know which color to choose, I wrote a perl script using Net::SNMP to get infos about speed, duplex...
Thanks guys.
Bye
Hm. Actually, I'd be more tempted to take the images and use CSS styles to color them.
For example, if you took one of those and turned the colored areas transparent, you could place them using CSS, and change the background color, either with generated Perl or with JavaScript on the fly.
It gets a little complex, admittedly; you'll have to create 26 styles (one for each switch), placing them appropriately. You'll need two images (right-side up and upside-down). You'd also have
.yellow { background-color: yellow; }
and so on. But then it's just a matter of adding the appropriate class to the appropriate div; no need to load six different image variants (just two), and you gain the ability to adjust the colors to be anything you want with just a change to the CSS, and do so dynamically if you like.
Does that make any sense?
PerlMagick
How to slice some text (html) string into number of pages to be possible read text as a book?
Thanks for suggestions.
Assuming you are happy recognising only a subset of HTML markup without CSS (here I assume <p/><b/><i/><br/> tags only plus <font size=/> for font size changes (with other attributes ignored), <img> tags for images with all but src,width,height ignored and accurate width and height mandatory with all other tags/attributes ignored):-
TidyLib seems to have an MIT license - http://tidy.sourceforge.net/#source
SAX parse the XHTML output of TidyLib using NSXmlParser into a custom object model (unless you are exclusively using later versions of iPhone OS with public builtin DOM parser API in which case just use a DOM object model).
Set up a state machine with a caret position at top left of page and initial font size and formatting, page number of 1, maximum height of glyphs/images in current line of zero, and empty list of page boundaries.
For each run of text or image in object model, apply pre-ceding font size/format modifications, measure text using iPhone text measurement calls, reducing text length (trim to nearest space or hyphen) until it fits on current line, and resetting caret to line beginning and continuing for line wraps, and apply following font size and formatting changes. Over-count the width and height of text by some factor in cases where this is found to be required to prevent page overflow in the actual page rendering engine (UIWebView; you will have to experiment to see what the factors in the rendering engine are). Record page boundary in list.
Convert objects between page boundaries to simplified XHTML for each page. You may wish to add some CSS at this point for example to format link colours. You will need to convert local references to anchors on another page to load the correct other page. Perhaps add page footer/header with page numbers (subtract size of these from page height in earlier steps).
Save XHTML as set of files.
In essence this will work as long as the source HTML is specially prepared to use a subset of HTML for your app. Any old HTML will not do, though it might perhaps not be completely useless to give a rough idea for previews in some instances for some files.
The description above assumes you throw away formatting like ALIGN= and tables. It really is a very basic approach and will not reproduce complex pages as originally designed! It might well not suit you!
Perhaps the files should be pre-processed before reaching the iPhones in the field but if the iPhone OS / WebView line-wrapping/test positioning behaviour changes, the best position for page breaks may change. So you may need to cut your pages smaller than you think they need to be to allow for some unexpected growth when the rendering engine changes. Hmm. Perhaps not an easy task!
I haven't even tried to analyse HTML tables... HTML is of course, in its non-restricted full glory enormously probably unmanageably complex.