Global image width
HI
here's my problem:
I can set a maximum image width glboally in contribute, so if
a uer uploads a pic. the maximum width is let's say 600px. that's
fine, but..
can i put some code in my dreamweaver pages that page A has a
maximum width of 600px and page B a maximum width of 700px?
Love to hear from you!
HI
here's my problem:
I can set a maximum image width glboally in contribute, so if
a uer uploads a pic. the maximum width is let's say 600px. that's
fine, but..
can i put some code in my dreamweaver pages that page A has a
maximum width of 600px and page B a maximum width of 700px?
Love to hear from you!
Similar Messages
-
Not able to get image width after uploading image
hi
I am working on uploading image. Once the image is uploaded I need to know image width and height. Right now I am listening to "complete" event but it seems image is still not loaded when the complete event is raised as it returns image width as zero. This is very urgent and imp for me, Please let me know how can I get the wridth and height of image once it is uploaded on remote server
<mx:VBox width="100%" height="100%">
<mx:Label text="Image" />
<mx:HBox width="100%" height="10%">
<mx:TextInput id="txt_imgname" width="321"/>
<mx:Button label="Browse" click="bn_Browse_Click()"/>
</mx:HBox>
<mx:Canvas width="400" height="264" backgroundColor="#000000" borderStyle="solid" cornerRadius="12" borderThickness="3" borderColor="#222F92">
<mx:ProgressBar id="progressBar" indeterminate="true" visible="false" height="1%" />
<mx:Image id="img" complete="{imageLoadListener(event)}" />
</mx:Canvas>
<mx:HBox width="100%" height="10%" horizontalAlign="right" verticalAlign="middle">
<mx:Button label="OK" id="okbutton" click="bn_ok_click()" />
<mx:Button label="Cancel" click="bn_cancel_click()" />
</mx:HBox>
private function bn_Browse_Click():void
CreateFileReference();
fileReference.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, onUploadCompleteData);
FileBrowse();
private function FileBrowse():void
try
var success:Boolean = fileReference.browse(allTypes);
catch (error:Error)
Alert.show("Unable to browse for files.");
private function CreateFileReference():void
var imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png");
allTypes = new Array(imageTypes);
fileReference = new FileReference();
fileReference.addEventListener(Event.SELECT, selectHandler);
fileReference.addEventListener(ProgressEvent.PROGRESS, fileRef_progress);
private function selectHandler(event:Event):void
var request:URLRequest = new URLRequest("http://"+TestLoginIntegration.GetServerAddress()+"/FileUpload/Default.aspx");
try
request.contentType = "application/octet-stream";
request.method = "POST";
fileReference.upload(request,fileReference.name,false);
catch (error:Error)
Alert.show("Unable to upload file." + error.message);
private function fileRef_progress(evt:ProgressEvent):void
img.source = "";
progressBar.visible = true;
private function onUploadCompleteData (event : DataEvent) : void
var filePath:String = event.data;
img.source = filePath;
progressBar.visible = false;
txt_imgname.text = GetFileNameFromPath(filePath);
private function imageLoadListener(e:Event):void{
Alert.show(e.currentTarget.width);
private function GetFileNameFromPath(filepath:String):String
if(filepath == null || filepath == "")
return null;
var name:String = filepath.substring(filepath.lastIndexOf("/") + 1, filepath.length);
return name;Read this older post
http://forums.adobe.com/message/1900768#1900768 -
Adjust image width and position along with browser size automatically.
Hi, I'm trying to place an image at the left edge of browser window, and the image width is 50% of the browser window size. The similar effect can be found on this website. Lenzing Instruments
Notice that as the browser zoom out, the image remains half of the width of browser window and align with the right edge of the browser.
I'm new to Muse. Not sure if it is possible to achieve this effect in Muse. I know Muse can set image 100% width of browser window, but how about 50%, 75% and other user defined proportion?
Any help will be appreciated!Thank you for your reply Sanjit. Could you explain more in details about
Exact responsiveness cannot be achieved but yes with scroll and pin you can create a similar effect
I also followed this post Can you create responsive sites with Adobe Muse? It seems that Muse does not support responsive design very well. So I'm not sure how exactly to get an similar responsive design effect in Muse.
Thanks!
Yinze
Design Engineer
Lawson Hemphill Inc. -
Controlling image width in XML brought into TextField via RSS
Hello. First off, let me say that I am new to these forums,
and new to AS 3.0
Here's my question.
I'm building an RSS Reader. Everything is working great,
except I can't figure out how to control the size of images
embedded in the XML of the blog posts.
I attempted to set up a textField with an attached css
stylesheet to limit image widths, but I couldn't get that to
function. Should I try saving the remote XML to my server via PHP,
and then adding my desired maximum width to every <img> tag?
That seems like a lot of work for a simple task.
Ideally, I'm dreaming of a textField or TextArea or
ScrollPane property that would force contents to obey the
container's width. Can you tell I usually write css?
Thanks in advance for any advice.Assuming that html is valid xml, and it apparently is if you
are working with it successfully, you would access that value like
this:
description.img.(@src)
A labelFunction would make it easy to display that string.
I haven't worked much with in-line renderers so ai am not
sure you you would do it in there.
Tracy -
http://pyroblue.dyndns.org:8080/flexapps/BhgPhotoContest/bin/BhgPhotoContest.html
if you view that page, you can see there is a lot of
whitespace underneath the image...im just setting the image width
(similar to what you do with HTML)...but for some reason, Flex puts
a bunch of whitespace (the original height's worth) at the bottom
of the image....
my mxml file looks like this:
<mx:HTTPService id="contestListing" url="photocontest.xml"
result="pcDataHandler(event)" fault="faultHandler(event)"/>
−
<mx:Repeater dataProvider="{photoContests}"
id="pcRepeater">
−
<mx:VBox>
<mx:Label
text="{photoContests.getItemAt(pcRepeater.currentIndex).pcName}"
fontSize="14" fontWeight="bold"/>
−
<mx:HBox>
<mx:Image
source="{photoContests.getItemAt(pcRepeater.currentIndex).prevPhoto}"
maxWidth="75" maintainAspectRatio="true"/>
<mx:Text
text="{photoContests.getItemAt(pcRepeater.currentIndex).desc}"
width="400" fontSize="10"/>
</mx:HBox>
</mx:VBox>
</mx:Repeater>
</mx:VBox>
any ideas?Let's say your image is 300x300 pixels. You want to place it
into an area that is 100x200 and an area that's 500x200, centered
in both:
<mx:Image id="img1"
width="100" height="200" source="{imagefile}"
scaleContent="true" maintainAspectRatio="true"
horizontalAlign="center" verticalAlign="middle" />
<mx:Image id="img2"
width="500" height="200" source="{imagefile}"
scaleContent="true" maintainAspectRatio="true"
horizontalAlign="center" verticalAlign="middle" />
For img1, the smallest dimension is 100 (width) which it
matches to the real image's maximum dimension which is 300. That
means img1 will display an image 100x100 centered vertically with
50 pixels above and below.
For img2, the smallest dimension is 200 (height) which it
matches to the real image's maxium dimension which is 300. That
means img2 will display an image 200x200 centered horizontally with
150 pixels to the left and right.
The Image tag has 2 dimensions: img.width and img.height is
the area it occupies on the display. img.contentWidth and
img.contentHeight is area the pixels occupy. For img1, contentWidth
and contentHeight are 100, for example. -
How can I get the image width and height stored in database?
Hi!I write s servlet to display images store in database.but how can I get the image width and height?
Have you tryed using PJA or a similar library?
I presume you get java.lang.NoClassDefFoundError on the line :
Toolkit.getDefaultToolkit();? -
[CS2]How to get the Image Width & Height using JS (ILLUSTRATOR CS2)
Hi,
How to get the Image width & height of an Image using javascript .Im using Illustrator CS2.
Any sample code
Regards
MyRiazyou can reference the dimensions of a loading image (or swf)
by referencing the target movieclip's dimensions AFTER loading is
complete. ie, use preloader code or the onLoadInit() method of a
moviecliploader listener. -
Hi,
We are indexing file share with images and get the properties of Image Width, Image Height, Image Size (we show it as refiners in SharePoint after make it managed properties). Somehow when the picture is png format - we see only Size but not height and width.
Is that any setting that should be done in the file share (when i select an image in the windows explorer window i can see all its properties, and it seems that png files do expose the width and height properties
keren tsurHi Keren,
According to your description, my understanding is that when you tried to crawl file share with images, the ows_ImageWidth and ows_ImageHeight crawled property for PNG file could not be generated.
For your issue, I can reproduce your issue in my SharePoint 2013 environment. For a workaround, you can upload the PNG images into SharePoint images Library and they would work fine.
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Hello!
I have an Image within a Canvas.
Both of them have width set to 100%:
- the Canvas has that so that it will stretch as much as it's own containter allows it.
- the Image has both width and height set to 100% so that images larger than the Canvas are resized, otherwise a huge image is displayed and scroll bars for the Canvas.
My question is, how can I get the Image width and height, not the container's but the real width and height of the displayed image? I need this because the Image container will always be as large as the Canvas.
The idea is to superposition a canvas with text with the same width as the image, not the Image container, the image itself.
Thank you!Not entirely what I wanted though now that I look more closely.
It gives me the W and H of the image, not the resized image.
The image is 1024x768 (for example) but resized to fit into a container... I wanted the size of the content displayed, not the size of the content loaded. -
Hi everybody,
I'm quite a newbie using AS3 and as first pretentious learning project I'm creating a image multigallery.
At this moment I have two questions (between several future others) relative to the code I'm writing (and suffering):
How to correctly set the buttonMode in a dinamically created buttons?
and
How to get the width of the images that I'm dinamically loading? I'm planning to put them side by side, for this I need to know the width of each one.
In the thread title I wrote that it can be just one doubt despite the totally different purposes of the codes. Maybe.
Let me explain why: until now I could not understand completely the right way to direct the events inside dinamic functions.
Here's my code until now:
//// CREATE CONTAINERS ////
// CREATE MENU CONTAINER //
var menuContainer:MovieClip = new MovieClip();
menuContainer.x=10;
menuContainer.y=300;
addChild(menuContainer);
// CREATE IMAGES CONTAINER //
var imagesContainer:MovieClip = new MovieClip();
imagesContainer.x=100;
imagesContainer.y=10;
addChild(imagesContainer);
// IMAGE LOADERS //
var imagesLoader:Loader;
var bigImagesLoader:Loader;
//// LOAD XML ////
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, whenLoaded);
xmlLoader.load(new URLRequest("XML/roiaXML.xml"));
var xml:XML;
function whenLoaded(evt:Event):void {
xml=new XML(evt.target.data);
var mySetsList:XMLList=xml.children();
//// MENU BUTTONS ////
// POSITIONING BUTTONS INSIDE MENU CONTAINER//
var rowsQuantity:Number=3;
var columnsQuantity:Number=Math.ceil(mySetsList.length()/rowsQuantity);
var cellWidth:Number=160;
// CREATE BUTTONS //
for (var i:int=0; i< mySetsList.length(); i++) {
var newSetButtonMC:setButtonMC=new setButtonMC();
var imageNodesArray:Array = new Array();
for (var j:int=0; j<mySetsList[i].IMAGE.length(); j++) {
imageNodesArray.push(mySetsList[i].IMAGE[j].attribute("smallURL"));
newSetButtonMC.imageArray=imageNodesArray;
newSetButtonMC.setButtonText.text=mySetsList.attribute("setTitle")[i];
newSetButtonMC.setButtonText.autoSize=TextFieldAutoSize.LEFT;
var cellX:Number=Math.floor(i/rowsQuantity);
var cellY:Number=i%rowsQuantity;
newSetButtonMC.x=cellX*cellWidth;
newSetButtonMC.y=cellY*(newSetButtonMC.height+10);
// I really don't know how to set the newSetButtonMC.buttonMode = true, nothing worked until now
newSetButtonMC.addEventListener(MouseEvent.CLICK, onClickButton);
menuContainer.addChild(newSetButtonMC);
//// MENU BUTTONS ACTIONS ////
function onClickButton(mevt:MouseEvent):void {
// LOAD GALLERY IMAGES //
var targetButton:setButtonMC=setButtonMC(mevt.currentTarget);
for (i=0; i<targetButton.imageArray.length; i++) {
imagesLoader = new Loader();
imagesLoader.load(new URLRequest (targetButton.imageArray[i]));
imagesLoader.addEventListener(Event.INIT, getImageWidth);
imagesLoader.x=i*200;
imagesContainer.addChild(imagesLoader);
// LOAD BIG IMAGE WHEN CLICK IMAGE FROM GALERRY //
imagesLoader.addEventListener(MouseEvent.CLICK, loadBigImage);
function getImageWidth(evtImageWidth:Event):void {// FUNCTION TO GET IMAGE WIDTH //
// I really don't know what to do here, i've tryed a lot
trace(evtImageWidth.target.width);
trace("ok");
function loadBigImage(event:MouseEvent):void {
trace("ok");
I've tryed (and searched for solutions) a lot, maybe someone can help me.
Thanks everybody . AbstratoSomething new happened in my life, and it's called "contentLoaderInfo".
<--- real happiness
With this:
imagesLoader.contentLoaderInfo.addEventListener(Event.INIT, getImageWidth);
plus this:
function getImageWidth(evt:Event):void {
trace(evt.target.width);
I was close to reach the supreme nirvana and I could trace the images widths.
But there is a problem: i don't know what to do with the values to load each image side by side.
Does someone know?
Thanks . Abstrato -
Nikon 5000 camera. I am converting nefs to dng. I am new to this whole area. I am trying to figure out why previews ina given software (IDImager) look different for the dng vs the nef. As an aside I am looking at eh exif data. For the nef the data are:
Image Width:160
Image Length: 120
For the DNG
Image Width: 256
Image Length: 170
Why are they different? And does it matter since as I understand this only for how the RAW data are viewed in any preview and have no effect on the actual "raw" data.
JDIf you're talking about the JPEG preview image contained within the files, I think the DNG converter is simply creating a little bit larger preview image. This does not have any impact on the raw data.
-
How to get blob image width with ordimage?
Hello,
I have trouble getting image width with ordimage. I have quite the same program for processing images as here: http://spendolini.blogspot.com/2005/10/manipulating-images-with-database.html
so I have declared image files as BLOB files. How can I get the width for the them?
There is a sample from ordimage reference:
DECLARE
image ORDSYS.ORDImage;
width INTEGER;
BEGIN
SELECT p.product_photo INTO image FROM pm.online_media p
WHERE p.product_id = 3515;
-- Get the image width:
width := image.getWidth();
DBMS_OUTPUT.PUT_LINE('Width is ' || width);
COMMIT;
END;
the ORDSYS.ORDIMAGE is used instead of BLOB here. when i do the same then i can't select BLOB content into the ORDSYS.ORDIMAGE variable. And otherwise I can't use the getWidth with the BLOB variable.
Can anybody help please?Hi,
the column blob_content is not suitable for storing into v_image2 because variable v_image2 is of type ORDSYS.ORDIMAGE and the column is BLOB.
I used the following method instead:
declare
image blob;
attributes clob;
img_mimeType varchar2(32);
img_width integer;
img_height integer;
img_contentLength integer;
fileFormat varchar2(32);
contentFormat varchar2(32);
compressionFormat varchar2(32);
begin
DBMS_LOB.CREATETEMPORARY(attributes, TRUE, DBMS_LOB.CALL);
select img
into image
from image_repository
where id = 0;
ORDSYS.ORDImage.getProperties(image,
attributes,
img_mimeType,
img_width,
img_height,
fileFormat,
compressionFormat,
contentFormat,
img_contentLength);
dbms_output.put_line(img_mimeType);
dbms_output.put_line(img_width);
dbms_output.put_line(img_height);
dbms_output.put_line(fileFormat);
dbms_output.put_line(compressionFormat);
dbms_output.put_line(contentFormat);
dbms_output.put_line(img_contentLength);
DBMS_LOB.FREETEMPORARY(attributes);
end;
try adapting this code and think about the possibility of "caching" image properties, because it takes some time to retrieve them every time.
Bye,
Flavio
http://oraclequirks.blogspot.com/search/label/Apex -
Overriding image width with updateExportSettings
Writing my first lightroom plugin, I have created a minimal example which should set the photo width here and included below. However I can not get the image to be the 400 x 400 specified.
ExportFilterProvider400.lua
local LrView = import 'LrView'
local bind = LrView.bind
-- This function will create the section displayed on the export dialog
-- when this filter is added to the export session.
local function sectionForFilterInDialog( f, propertyTable )
return {
title = LOC "$$$/SDK/MetaExportFilter/SectionTitle=400x400 Filter",
end
-- Example on updating export settings
local function updateExportSettings( exportSettings )
exportSettings.LR_size_maxHeight = 400
exportSettings.LR_size_maxWidth = 400
exportSettings.LR_size_doConstrain = true
end
return {
sectionForFilterInDialog = sectionForFilterInDialog,
updateExportSettings = updateExportSettings , --Does this works
Info.lua
return {
LrSdkVersion = 3.0,
LrSdkMinimumVersion = 1.3, -- minimum SDK version required by this plugin
LrPluginName = "400x400 Export",
LrToolkitIdentifier = 'sample.export400x400',
LrExportFilterProvider = {
title = LOC "$$$/SDK/MetaExportFilter/Sample=400x400 Size", -- the string that appears in the export filter section of the export dialog in LR
file = 'ExportFilterProvider400.lua', -- name of the file containing the filter definition script
id = "metadata1", -- unique identifier for export filter
VERSION = { major=5, minor=0, revision=0, build=907681, },
Adobe Lightroom can load the plugin, and add it to the export session, but the updateExportSettings do not seem to take effect. Tested in Lightroom 5.3.
ThanksThanks, Will try this out.
On closer reading the SDK Guide on page 51 does mention:
If the service has defined an updateExportSettings() function, it is called.
and at the end of that secion:
The filters, if any, are not involved at this stage.
Was not aware of the difference of an ExportService plugin and an ExportFilter plugin at the time of reading.
Update:
This is the minimum example I got working Info.lua stays the same:
local function sectionForFilterInDialog( f, propertyTable ) return { title = LOC "$$$/SDK/MetaExportFilter/SectionTitle=400x400 Filter", }end --------------------------------------------------------------------------------local function postProcessRenderedPhotos( functionContext, filterContext ) local renditionOptions = { filterSettings = function( renditionToSatisfy, exportSettings ) exportSettings.LR_size_maxHeight = 400 exportSettings.LR_size_maxWidth = 400 exportSettings.LR_size_doConstrain = true end } for sourceRendition, renditionToSatisfy in filterContext:renditions( renditionOptions ) do -- Wait for the upstream task to finish its work on this photo. local success, pathOrMessage = sourceRendition:waitForRender() endend-------------------------------------------------------------------------------- return { sectionForFilterInDialog = sectionForFilterInDialog, postProcessRenderedPhotos = postProcessRenderedPhotos,} -
Image width/height without loading file into JVM?
How do we find the width/height of an image, without loading the image into the JVM? Also it would be nice to to obtain the height/width without creating any new objects(from which i would obtain the height and width).
Thanks
Tapan
Edited by: tapanmokha on Jan 27, 2009 8:03 AMImageInputStream imageStream =
ImageIO.createImageInputStream(location);
java.util.Iterator<ImageReader> readers =
ImageIO.getImageReaders(imageStream);
ImageReader reader = null;
if(readers.hasNext()) {
reader = readers.next();
}else {
imageStream.close();
//can't read image format... what do you want to do about it,
//throw an exception, return ?
reader.setInput(imageStream,true,true);
int imageWidth = reader.getWidth(0);
int imageHeight = reader.getHeight(0);
reader.dispose();
imageStream.close(); -
Set width of adv. datagrid according to image width.
hi
i am very new developer of flex.i want to set the wodth of
advanced datagrid column according to the width of dataitem inside
that.so i have got a code .that work best for text item renderer.i
need some code and logiz to check the image object in item renderer
and set the widtrh of datacolumn to its width.
please help me.
Thx in advance,Modify this two parameters in Formsweb.cfg file . If not there create 2 entries for your configuration.
width =<Values you want>
height=<Values you want>Else
width =100%
height=100%Edited by: Lokanath Giri on ३ सितंबर, २०१० १:५५ अपराह्न
Maybe you are looking for
-
I've been reading up on some of the RAID information scattered around the Internet, and I've also been reading the booklets bundled with my MSI motherboard. My questions lean more toward the meaning of Promise and its various "forms" (?), and I think
-
Multiple subnets possible?
All, I'm using my access point as a dhcp server in a test environment. Is it possible to have multiple subnets configured like a router-on-a-stick configuration? Thanks! John
-
Tab Controls - Adding a page programmatically?
It's probably not possible from what I've read on this forum, but I would really like to be able to add tabs programmatically (v6.0.2). But, having just read that they are like enums and are read only (can't change page names) it looks like this is g
-
Captivate, Flash, & Authorware
I know you can import a published SWF file, but... Is it possible to import a captivate or Flash 8 library directly into Authorware? -- Ken
-
Hi, I'm interested in buying a MSI AE2050-074EU All In One PC. But (annoyingly) I have one application that will only work on the 32bit version of Win7. I understand this device comes with 64-bit pre-installed, so: a) does it come with an installati