ImageView files
Recent Utilitybill only gave imageview.spx as the ability to view my Bill. How can I handle this. ?
In fact, when I search imageview.aspx it seems to be used for images (the meaning of the name), then you can try to rename it with an extension .jpg on the assumption that this is probably a JPEG image.
Tags: Firefox App
Similar Questions
-
Hello guys,.
I want to use a GIF image in a Qml (ImageView) file.
I've used this, but it did not work. (No animation)
ImageView {}
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
ID: imageView
imageSource: "3.gif".
attachedObjects:]
ImageAnimator {}
ID: imageAnimator
animatedImage: imageView.image
started: true
}
]
}Thank you
He worked with a Web view
WebView
{
URL:"local:///assets/image.gif".
}
-
Load image into ImageView using file:///
Hello
According to this article http://supportforums.blackberry.com/t5/Cascades-Development-Knowledge/The-Different-Methods-of-Loadi... we should be able to load images QML using file:/// and absolute path.
For the life of me I can't load an image not only of shared/accounts/1000/shared/subfolders, but even of the application data folder.
Can someone share * work * example of loading images in ImageView using file:///
Thank you.
https://developer.BlackBerry.com/Cascades/documentation/UI/Image_Resources/content.html
-
ImageView expected to auto-sense orientation
A few comments to the people of the API:
Shouldn't the ImageView read the EXIF of a JPEG image and automatic image rotation? And so by default, shouldn't there not a property such as 'autoOrient' or 'function' that this happens?
Seen developers manually read the EXIF data, manually turn the images, etc., seems to be a waste of developer time.
Follow-up question: if I do it manually and you end up with a QImage, how to recognize an ImageView to use a QImage? Is this possible?
And one last question followed: what type is the property of 'image' of the ImageView? He says it's a QVariant, but is not very useful. Can we set this property, or is read-only? Overall, I think that the "image" property documentation could use some improvements.
Thank you
Daniel
Understood that through:
... my container was not big enough. I have change the container that has the ImageView to fill the page, and which prevented the cropping. I'm glad it was something simple.
Here is a very rough code incase it is useful to someone else:
#include
#include #include #include ... // Gets called when the root container is resized, so that we can track // how large it is. void PhotosModel::updateContainerSize(qreal width, qreal height) { // Is this the initial call to updateContainerSize, or did // the size of the container change because of an orientation // change? bool initOrReInit = (containerWidth != (int)width); containerWidth = width; containerHeight = height; if (initOrReInit && imageLoadedFlag) { // When we tried to load this, we didn't yet know the width of the // screen. Now that we do, display the image. qDebug() << "Delayed image load"; loadImage(photos.at(curPhoto).absoluteFilePath()); } } void PhotosModel::loadImage(QString file) { imageLoadedFlag = true; // If the screen hasn't loaded yet and we don't know how wide // the container is, then hold off until we do. if (containerWidth == 0) { qDebug() << "Can't display image yet"; return; } int width = -1; int height = -1; bool xyFlip = false; ExifLoader* loader = exif_loader_new(); exif_loader_write_file(loader, file.toStdString().c_str()); ExifData* data = exif_loader_get_data(loader); imageView->setRotationZ(0); int desiredRotation = 0; if (data != NULL) { //exif_data_dump(data); // Treating this as int* seems to result in corruption / bad behavior. // I think orientation is supposed to be a 'short int', which I would have // thought would be 2 bytes, but short int * doesn't seem to be consistent // either. So far char* seems to work. char* orientationPtr = (char *) GetExifValue(data, EXIF_TAG_ORIENTATION); if (orientationPtr != NULL) { //int orientation = *orientationPtr; int orientation = orientationPtr[0]; // 1 -> OK // 3 -> Rotate 180 // 6 -> CC 90 // 8 -> C 90 qDebug() << "Orientation: " << orientation; if (orientation == 3) { desiredRotation = -180; } // NOTE: Also doing this for orientation == 0, because I have // a photo with orientation 0 that seems to need this. // Confused. Picasa seems to know that the image needs // this rotation. else if (orientation == 6 || orientation == 0) { desiredRotation = 90; xyFlip = true; } else if (orientation == 8) { desiredRotation = -90; xyFlip = true; } else { desiredRotation = 0; } //qDebug() << "Width: " << width << ", Height: " << height; } long* widthPtr = (long *) GetExifValue(data, EXIF_TAG_PIXEL_X_DIMENSION); if (widthPtr != NULL) { width = (int)*widthPtr; } long* heightPtr = (long *) GetExifValue(data, EXIF_TAG_PIXEL_Y_DIMENSION); if (heightPtr != NULL) { height = (int)*heightPtr; } } if (width == -1 || height == -1) { // Trouble. We don't know how large the photo is. // For now we'll just show nothing. Will this ever happen? How can we // fail more gracefully? imageView->setVisible(false); ErrorHelpers::showDialog("Missing EXIF Data", "The EXIF data for this image doesn't indicate its width/height, and so it cannot be displayed."); } else { imageView->setVisible(true); } int virtualContainerWidth; int virtualContainerHeight; if (xyFlip) { qDebug() << "xyFlip"; virtualContainerWidth = containerHeight; virtualContainerHeight = containerWidth; } else { virtualContainerWidth = containerWidth; virtualContainerHeight = containerHeight; } qDebug() << "virtualContainerWidth: " << virtualContainerWidth; qDebug() << "virtualContainerHeight: " << virtualContainerHeight; float imageAspect = (float)width / (float)height; qDebug() << "imageAspect: " << imageAspect; float screenAspect = (float)virtualContainerWidth / (float)virtualContainerHeight; qDebug() << "screenAspect: " << screenAspect; int imageScreenWidth; int imageScreenHeight; if (imageAspect > screenAspect) { // Image is wider than screen aspect wise, so X will be limiting dimension. if (width > virtualContainerWidth) { imageScreenWidth = virtualContainerWidth; } else { imageScreenWidth = width; } // Better to round here? imageScreenHeight = (int)((float)imageScreenWidth / imageAspect); qDebug() << "Limited by X"; qDebug() << "imageScreenWidth: " << imageScreenWidth; qDebug() << "imageScreenHeight: " << imageScreenHeight; } else { // Image is taller than screen aspect wise, to Y will be limiting dimension. if (height > virtualContainerHeight) { imageScreenHeight = virtualContainerHeight; } else { imageScreenHeight = height; } // Better to round here? imageScreenWidth = (int)((float)imageScreenHeight * imageAspect); qDebug() << "Limited by Y"; qDebug() << "imageScreenWidth: " << imageScreenWidth; qDebug() << "imageScreenHeight: " << imageScreenHeight; } int imageX; int imageY; imageX = (int)((float)containerWidth / 2.0f - (float)imageScreenWidth / 2.0f); imageY = (int)((float)containerHeight / 2.0f - (float)imageScreenHeight / 2.0f); qDebug() << "imageX: " << imageX; qDebug() << "imageY: " << imageY; imageView->setPreferredWidth(imageScreenWidth); imageView->setPreferredHeight(imageScreenHeight); AbsoluteLayoutProperties* layoutProperties = new AbsoluteLayoutProperties(); layoutProperties->setPositionX(imageX); layoutProperties->setPositionY(imageY); imageView->setLayoutProperties(layoutProperties); qDebug() << "desiredRotation: " << desiredRotation; imageView->setRotationZ(desiredRotation); imageView->setImage(QUrl("file://" + file)); } void* PhotosModel::GetExifValue(ExifData* data, ExifTag tag) { for (int i = 0; i < EXIF_IFD_COUNT; i++) { ExifContent* content = data->ifd[i]; ExifEntry* entry = exif_content_get_entry(content, tag); if (entry != NULL) { return entry->data; } } return NULL; } ... and some related QML...
Page { Container { id: rootContainer objectName: "rootContainer" background: Color.Black; layout: DockLayout { } horizontalAlignment: HorizontalAlignment.Fill verticalAlignment: VerticalAlignment.Fill attachedObjects: [ // This handler is tracking the layout frame of the button. LayoutUpdateHandler { id: handler onLayoutFrameChanged: { photosModel.updateContainerSize(layoutFrame.width, layoutFrame.height); } } ] Container { layout: AbsoluteLayout {} horizontalAlignment: HorizontalAlignment.Fill verticalAlignment: VerticalAlignment.Fill ImageView { id: imageView objectName: "imageView" scalingMethod: ScalingMethod.Fill //scalingMethod: ScalingMethod.AspectFit preferredWidth: 1 preferredHeight: 1 layoutProperties: AbsoluteLayoutProperties { positionX: 1 positionY: 1 } // Tried this, but the image is still animating into place. loadEffect: ImageViewLoadEffect.None attachedObjects: [ ImplicitAnimationController { enabled: false } ] } }
It is an amount disappointing nonsense to be caused by the ImageView doesn't Autodetect not the EXIF orientation flag. Please improve this BlackBerry.
-
Integration of ImageView and Qimage
A large part of this issue has been discussed here:
Basically, the suggested correct way of converting a QImage ImageView is this one:
PixelBufferData pbd (PixelBufferData::RGBA_PRE,yourQImage.width(),yourQImage.height(),yourQImage.width(),yourQImage.bits()); yourImageView->setImage(pbd);
Then there was someone by specifying the format must be probably BGR instead of RGB, which could be done with OpenGL or like this:
image.rgbSwapped();
Here is my code I have a problem with:
PixelBufferData pbd(PixelBufferData::RGBA_PRE, orgPattern.width(), orgPattern.height(), orgPattern.width(), orgPattern.rgbSwapped().bits()); m_patternFrame->setImage(pbd);
orgPattern is a QImage loaded from a file path that is sure to exist. m_patternFrame is a pointer to the ImageView.
I know that m_patternFrame is a pointer valid because if I call its method setImageSource by the way I created the QImage, it displays this image. But when I run this code, it is printed in the console:
Context: Cannot find the node target with id %d 906.
Sometimes the number is different. When I tried again, it was 563. The application is not cursh or gel, but nothing happens with the framework, it is still empty.
Can anyone provide any help with this problem?
Thanks for starting a new thread and referring to another thread. Allows us to provide you with a timely response.
Before dive us into this too far, what is the width and height? (We are within the limits, I guess?)
And can you try to make the setImage in 2 steps: first to create the Image of the PDB rather than implicitly and test! image.isNull)
Stuart
-
Hi all
Try using filepicker to take several pictures and place them in different imageViews at the same time.
That's what I have so far for one frame at a time:
{FilePicker}
ID: picker1
Title: qsTr ("select an image")
string selectedFile property
mode: FilePickerMode.Picker
type: FileType.Picture
directories: [' / accounts/1000/shared/camera "]
viewMode: FilePickerViewMode.GridView
sortBy: FilePickerSortFlag.Date
sortOrder: FilePickerSortOrder.Descending
imageCropEnabled: true
onFileSelected: {}
selectedFile = selectedFiles [0]
imgView1.imageSource = "file://" + selectedFile
imgView1.visible = true
imgView1.scaleX = 1
imgView1.scaleY = 1
imgView1.rotationZ = 0}
}It works perfectly if I want to select a photo and place it in imgView1... but I imgView 1, 2, 3, 4, 5, 6, 7.
I would use the file selector choose 7 photos and put them in each imgView. I use FilePickerMultiple and it works great but can't seem to the get into each imgView separately.
Tried:
imgView1.imageSource, imgView2.imageSource, imgView3.imageSource is "file://" + selectedFile
Does not return an error but puts only the last selected photo imgView3 and not imgView1 or 2.
Any help would be amazing.
THX.
Dpcanada
Thank you very much!!!
Worked surprisingly well... you're a genius... you made my day.
This is what the code looks like on your help:
{FilePicker}
ID: picker7
Title: qsTr ("select an image")
string selectedFile property
mode: FilePickerMode.PickerMultiple
type: FileType.Picture
directories: [' / accounts/1000/shared/camera "]
viewMode: FilePickerViewMode.GridView
sortBy: FilePickerSortFlag.Date
sortOrder: FilePickerSortOrder.Descending
imageCropEnabled: true
onFileSelected: {}
for (var i = 0; i)< selectedfiles.length;="">
var selectedFile = selectedFiles [i];
imgView.imageSource = "file://" + selectedFiles [0]
imgView1.imageSource = "file://" + selectedFiles [1]
imgView2.imageSource = "file://" + selectedFiles [2]
imgView3.imageSource = "file://" + selectedFiles [3]
imgView4.imageSource = "file://" + selectedFiles [4]
imgView5.imageSource = "file://" + selectedFiles [5]
imgView6.imageSource = "file://" + selectedFiles [6]
imgView7.imageSource = "file://" + selectedFiles [7]}
}
}He brings in 7 different photos in separate different imgViews... Impressive... just great!
Thank you.
dpcanada
-
Hi guys,.
When I explore BB10 mmlibrary I get thumbnail of the files in the device. It's a chain like that
/fs/sfs/mmsynclite/IMG/88cdfeb9c31e6a59_256X256/3.jpg
I wonder just where are the location of the files and how do I show in an ImageView in my project.
Thanks in advance
You can try to look in file:///fs/sfs/mmsynclite/IMG/
It should work because debugging NowPlayingController cough this URL for the media, do not see why your tile would not show if she is looking in the same folder for the Source ImageView
file:///FS/SFS/mmsynclite/IMG/2c69ba0b81908e1a_256X256/2653.jpg
-
File for images of the Asset Picker
Hello
Here's the current code
FilePicker { id:filePicker type : FileType.Picture title : "Select Wallpaper" directories : ["app/native/assets/images/"] onFileSelected : { console.log("FileSelected signal received : " + selectedFiles); //make sure to prepend "file://" when using as a source for an ImageView or MediaPlayer } defaultType: FileType.Picture sourceRestriction: FilePickerSourceRestriction.LocalOnly viewMode: FilePickerViewMode.GridView }
The problem is with the directories.
I get the error "Cannot find source.
Anyone got any ideas how I could take the images stored under assets/images /?
FilePicker works like a card, which means that it is indeed another application. I don't think that he can access your data area of the app sandbox.
-
Hello
I want to load the special position of my file system image but image is not loaded and I am not able to see the image on siumulator.
Here is my code for the same thing.
ImageView * ImageView = pMyImageView:: create();
pMyImageView-> setImage (image);Page * new = Page() page;
Page-> setContent (pMyImageView);Application::setScene (page);
But no image is copied
You hardcoded the path to D: likely this file is not in this location on the Simulator or device.
See the documentation in https://developer.blackberry.com/cascades/reference/bb__cascades__image.html for this relative setting or using your assets.
Image inherits from resource, so isNull(). IsValid() and isEmpty() QUrl a.
You need to add defensive code.
Stuart
-
Animated images in place when loading new QML file
I noticed that when I insert new QML files, the images Animate into place.
For example, if the screen contains an image at the position X, Y, and width W and height H, then the image becomes visible at the point of coordinates 0,0-0 width and height 0 and anime then in place by flying over to the X, Y coordinates and more in addition to being finally width W and height H.
If I then click on the 'Back' button and enter this QML screen a second time, it does not animate.
This implicit animation is intended? While the implicit animations are pretty amazing and a great tool to have, it seems intuitive to the use of screens animations implicit when they are first loaded. It creates a rather unpleasant company and Visual distraction when loading screen.
I thought that I could disable it by adding the following to the ImageView controls:
attachedObjects: [ ImplicitAnimationController { enabled: false } ]
... but they are always animate.
Thank you
Daniel
Did you notice the sample code above? (yes)
This seems to be fixed with the latest SDK.
-
Push the files in the Simulator
Hello
I would choose a file specifically images and view it in the imageview.
But now I am unable to crack how to send pictures on the Simulator.
My camera does not respond within the Simulator as well.
Please let me know the possible solutions.
Thanks in advance.
Kind regards
SHA.
Hello!
Have you tried Target File System Navigator in Momentics? -
Unable to restore the ImageView ListComponent - image of the data folder
I downloaded an image in the folder data and want to show it in the listView.
In Listcomponent, I use an ImageView
"If I put its imagesource:".. /.. /.. "/ data/files/images/123.png".
The image appears correctly.
But if I try to put the same path of C++ code in the GroupDataModel, the image doesn't make.
Hi friends,
I found the solution. I hope that is useful you.
. HPP
#include
#include #include using namespace bb::cascades; class App: public QObject { Q_OBJECT public: App(); public slots: void onSelectionChanged(const QVariantList indexPath, bool selected); private: ListView *listView; }; . CPP
#include "app.hpp" #include
#include #include #include #include #include #include #include using namespace bb::cascades; App::App() { QmlDocument *qml = QmlDocument::create("main.qml"); AbstractPane *root = qml->createRootNode (); GroupDataModel *model = new GroupDataModel( QStringList() << "firstname" << "surname" << "imagepath"); model->setGrouping(ItemGrouping::ByFirstChar); listView = root->findChild ("listView"); QVariantMap person; person["firstname"] = "John"; person["surname"] = "Mark"; person["imagepath"] = "I will set on click."; model->insert(person); person["firstname"] = "Mark"; person["surname"] = "Russie"; person["imagepath"] = "asset:///icon.png"; model->insert(person); listView->setDataModel(model); QObject::connect(listView, SIGNAL(selectionChanged(const QVariantList, bool)), this, SLOT(onSelectionChanged(const QVariantList, bool))); Application::setScene(root); } void App::onSelectionChanged(const QVariantList indexPath, bool selected) { if (selected) { if (sender()) { GroupDataModel *stampModel = (GroupDataModel *) listView->dataModel(); QVariantMap map = stampModel->data(indexPath).toMap(); //map["imagepath"] = "asset:///icon.png"; map["imagepath"] = "../../../data/icon.png"; stampModel->updateItem(indexPath, map); fprintf(stderr, "\nSelection Called"); } }} . QML
import bb.cascades 1.0 Page { content: Container { ListView { objectName: "listView" listItemComponents: [ ListItemComponent { type: "header" HeaderListItem { title: ListItemData } }, ListItemComponent { type: "item" StandardListItem { id: root title: ListItemData.firstname description: ListItemData.surname imageSource: ListItemData.imagepath } } ] } } }
Currently, I put a static image and a rest black. It will have the value during the click on list black image (dynamically).
-
Data model with ImageView not displaying the image on OS10.1
in the qml, I have a ListView with a DataModel. The DataModel contains a label and ImageView.
I put the ImageView and etiquette like this
Entry QVariantMap;
QFile file (picture_file); file stored on the device
QFileInfo fileInfo (file);
QString qmlPath (fileInfo.absoluteFilePath ());the path of the file would like something like that
/Accounts/1000/APPDATA/com.example.TestApp.testDev_e_TestApp4a417186/shared/photos/TestApp/MyPicture.PNG
entry ['image'] = QUrl (qmlPath);
entry ["name"] = "Text";It works on 10.0.9 but when I recompile the target app to 10.1 or the image is not displayed. The label is.
Also, if I set the imagesource to the current folder the image appears fine.
entry ['image'] = "asset:///images/template.png";
What is the correct way to set the imageSource for ImageView?
I think your problem will be solved by file:// adding to the path of your file.
-
ImageView Black question screen on DA - anomaly or something else?
Hello friends,
I'm developing an application of connected local transit. Part of it includes essentially maps for each bus line. I use nested within a ScrollPane ImageView. Many of the cards are superior to a dimension 768 and 1280.
Question
ScrollPane ImageView displays BLACK on some images, but not others. I can't understand why and how to fix it.
My Application configuration
- Standard C + c++ / Cascades project
- Directory structure
[Standard empty project template] - + assets
-main.qml
import bb.cascades 1.0 //-- create one page with a label and text Page { content: Container { layout: DockLayout { } background: Color.create("#FFFFFF") preferredWidth: 768 preferredHeight: 1280 ScrollView { id: mapScroll scrollViewProperties { scrollMode: ScrollMode.Both } // This ImageView Appears Black on the DA - qml preview in IDE ok /*ImageView { id: m45ustock preferredWidth: 2913 preferredHeight: 2283 imageSource: "asset:///images/m45ustock.png" onTouch: { mapScroll.scrollViewProperties.scrollMode = ScrollMode.Both } } */ // THIS ImageView DISPLAYS CORRECTLY ImageView { id: m10town preferredWidth: 1287 preferredHeight: 1631 imageSource: "asset:///images/m10townsend.png" onTouch: { mapScroll.scrollViewProperties.scrollMode = ScrollMode.Both } } } } }
Create a folder "images" add attached images.
- images
-m10townsend.png
-m45ustock.pngNotes
I commented the ImageView displaying BLACK. Toggle comments to test.Why is this happening?
Ideas? Is this a bug? Are there restrictions on the ImageView in terms of file size, making it the dimensions, etc.?
Thank you!
Have you gotten nowhere on that?
If you need to do a program, one way is to use http://supportforums.blackberry.com/t5/Cascades-Development-Knowledge/Using-QImage-and-QPainter-to-P...
Was it the root cause of your problem?
Stuart
-
Help me solve my problem with onTouch imageView acted before I have a chance to scroll the Please
Hi, please help.
I have a little imageviews in a scrollview. Notecard will sail me to another page, however, at the time wherever I touch the image, it takes me to the appropriate page with no chance to scroll down. How to scroll and then press the image to navigate. It seems that notecard is competing with scrollview and ontouch victories.How I've implemented to scroll my arranged vertically imigeviews and then when I find the question I want to, I touch it and it goes to the next page which is a separate qml file.
scrolling workes fine when I commented the notecard section and ontouch fine work as well.
I like:
ImageView {}
horizontalAlignment: P
imageSource: "asset:///images/Sunshine.jpeg."
preferredWidth: 700,0
preferredHeight:200.0
minWidth: 30.0
minHeight: 30.0
Notecard: {}
page var getThirdPage() =;
Console.Debug ("pushing retail" + page)
navigationPane.push (page);
}
Property Page thirdPage
function getThirdPage() {}
If (! thirdPage) {}
thirdPage = thirdPageDefinition.createObject ();
}
Return thirdPage;
}
attachedObjects:]
{ComponentDefinition}
ID: thirdPageDefinition
Source: "thirdfilepage.qml".
}
]
}I have several of these points of view image, wraped in a single scrollview.
I tried to find it through Google as well as the documentation of cascades with no luck. I'd appreciate any help, please
Thank you
RolandI'm glad that it worked without any problems!
Please mark this resolved thread!
Maybe you are looking for
-
Tecra 9100: The cover is broken and TFT is dead
I have a Toshiba Tecra 9100 512 MB of ram CD/DVD + ext DVD-+ RW + ext 160 GB HDD etc, but also epilepsy.I came in overweight and broke the lid.The case is broken (cover only), and the TFT screen is dead. Can you fix this? And if so; How to what to do
-
Satellite L300D: Unable to connect to a network using WIFI
I can't connect to a network using WIFI on my new laptop (which seems to be fairly widespread)When I followed the advice of the Knowledge Base, he said I should see an unknown device icon when I click on the other peripheral icon instead there is an
-
My HP Photosmart Plus B210e printer will not print black ink, only gray/color.
My printer HP Photoshop more faithful 210th has stopped printing in black ink last week. It prints color beautifully, but where there should be black it comes out just as gray or white spot. I have tried two new ink cartridges, cleaned print heads, r
-
Windows Vista to windows 7 upgrade - making circles in the round
I tried to upgrade Vista to windows 7 using the Microsoft Web site. The Upgrade Advisor confirms that I am compatible. It contains a link to «get detailed instructions on how to upgrade» Step 1 of this guide request control panel > system for confir
-
Dell Inspiron N5110 does not support Windows 10?
I'll try once more to make this post to cause the previous, it never went live. I have a 3 years old Dell Inspiron N5110 i5 / 8GB ram/Nvidia/Win 7 home premium and I am very pleased with his performance and build quality. Yesterday, I tried to book a