BitmapData class - displaying and resizing

Hi Forum,
I'm trying to teach myself flex by working through the tutorial videos on here and searching the net, however i have become a bit stuck with image manipulation.
I want to make a Flash solution that loads in an image and with let the user zoom in and out and pan around.  I'm having problems quite early on particularly with displaying the resized image correctly and was wondering someone could provide some advice....some simple advice.  I have development experience but very little knowledge with flash/flex components.
So far i have loaded the image, and i've been playing around with the bitmapdata class and managed to resize it.  But when i output it the image is smaller but has a background that takes up the original size.  I Think this may be solved somehow with the rec property?  But i can't get it to work. 
I wanted to load the image at its original size and then resize it smaller to fit a view area, then when someone wants to zoom increase the size of the displayed image with the overflow not showing.
So far my output looks like this:
As you can see the image is smaller but it must still be taking up the same size or something because the canvas has scoll bars on it.  Whats happening.  Also when the image is bigger than the canvas how can i not have scroll bars and hide the overflow.  Here is my code:
mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
     layout="absolute"
     backgroundGradientAlphas="[1.0, 1.0]"
     backgroundGradientColors="[#FBF8F8, #FBF8F8]"
     applicationComplete="Init()">
     <mx:Script>
          <![CDATA[
               private var imgLoader:Loader;
               private function Init():void{
                    imgLoader = new Loader();
                    //Image location string
                    var imageURL:String = "http://www.miravit.cz/australia/new-zealand_panoramic/new-zealand_panoramic_01.jpg"
                    //Instantiate URL request
                    var imageURLReq:URLRequest = new URLRequest(imageURL);  
                    imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoadCompleted);
                    imgLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
                    //Begin image load
                    imgLoader.load(imageURLReq);
               private function imgLoadCompleted(event:Event):void{
               //On completion of image load     
                    progressBar.visible = false;
                    var scale:Number = .1;
                    //Set matrix size
                    var m:Matrix = new Matrix();
                    m.scale (scale,scale);
                    var bmd:BitmapData = new BitmapData(this.width, this.height);
                    bmd.draw(this.imgLoader,m);
                    var bm:Bitmap = new Bitmap(bmd);
                    auctionImageContainer.source = bm;
               private function progressListener(event:ProgressEvent):void {
                //Update progress indicator.
                     progressBar.setProgress(Math.floor(event.bytesLoaded / 1024),Math.floor(event.bytesTotal / 1024));
          ]]>
     </mx:Script>
     <mx:Canvas height="583" width="674">
          <mx:Canvas id="cvsImage"
               borderColor="#BABEC0" borderStyle="solid" left="152" right="151" top="177" bottom="121">
               <mx:Image id="auctionImageContainer" />
               <mx:ProgressBar id="progressBar"
                         mode="manual" 
                           x="84.5" y="129"
                           labelPlacement="center"
                           themeColor="#6CCDFA" color="#808485" />
          </mx:Canvas>
     </mx:Canvas>
</mx:Application>
Thanks for any help
     LDB

MediaTracker isn't about the number of images. I've been bitten in the ass by this before -- images seem to magically refuse to appear, or only appear on reloads, and it's because paint() got called before the image was loaded. MediaTracker fixed it.
I don't know what you mean about images not working in constructors though. You can do that.
Here's some code that works to display an image (for me anyway):
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
public class Test {
  public static void main(String[] argv) {
    Image i = Toolkit.getDefaultToolkit().createImage("image.jpg");
    Frame f = new Frame("Test");
    MediaTracker mt = new MediaTracker(f);
    mt.addImage(i, 1);
    try {
      mt.waitForAll();
    } catch (InterruptedException e) {
      e.printStackTrace();
    f.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        System.exit(0);
    f.add(new Displayer(i));
    f.pack();
    f.setVisible(true);
  private static class Displayer extends Canvas {
    private Image i;
    Displayer(Image i) { this.i = i; }
    public void paint(Graphics g) {
      g.drawImage(i, 0, 0, null);
    public Dimension getPreferredSize() {
      return new Dimension(i.getWidth(null), i.getHeight(null));
    public Dimension getMinimumSize() { return getPreferredSize(); }
}

Similar Messages

  • New documents get stuck at top of 2nd display only in First Class app and mavericks

    I've read a lot of the discussions about windows getting stuck in the left corner, etc. My problem  is slightly different.
    I seem to have a unique problem.  I am running 10.9.2 Mavericks and have an hdmi cable connecting my tv as a 2nd display (extended desktop).
    We use First Class as our LMS, and I will frequently have a window open on the 2nd display (random) and get "stuck" at the top of the screen.
    It doesn't seem to matter what the display settings are.  The bar with the close/max/min buttons is not showing, so I cannot drag the window anyplace. The only way I've found to unstick it is to change the display setting for the second display and then move the window. sometimes this will happen each time I open a window in F.C., and sometimes it stops.  The display settings don't seem to matter, except that when I change them (only for the 2nd display), the window unsticks.  Thoughts?

    That is because you don't make any attempt to clear the old list and repopulate it, you just make a new one and add it in. Try making a constructor that creates your GUI then just add, clear, and otherwise manipulate the objects/lists in the GUI--you don't need new ones.

  • Displaying and manipulating an BufferedImage

    I have to program a game in Java for a university course. Therefore I need to display a quite big image (the game field).
    I tried to display the image with an own Panel Class ImagePanel:
    public class ImagePanel extends JPanel {
        private BufferedImage background;
        /** Creates a new instance of ImagePanel */
        public ImagePanel(BufferedImage image) {
            this.setBackground(image);
        public void paintComponent(Graphics graphic) {
            super.paintComponent(graphic);
            graphic.drawImage(getBackground(), 0,0,getBackground().getWidth(),getBackground().getHeight(), this);
        public Dimension getPrefferedSize() {
            return new Dimension(getBackground().getWidth(),getBackground().getHeight());
        public BufferedImage getBackground() {
            return background;
        public void setBackground(BufferedImage background) {
            this.background = background;
    }I display a BufferedImage using the ImagePanel on a JScrollPane. The image is displayed, but the scrollbars doesn't appear (the Horizontal and VerticalScrollBarPolicy is set to AS_NEEDED) :
            BufferedImage map = ImageIO(UrlToFile);
            Graphics2D graphic = map.createGraphics();
            graphic.drawRenderedImage(map, null);
            imagePanel = new ImagePanel(map);
            jScrollPane1.add(imagePanel);
            jScrollPane1.getViewport().setView(imagePanel);   I also want to resize the image from time to time and put another image on the image. Can anyone tell me how to display the image, scroll and resize it? I also have to put other (small) images on the map, is graphic.DrawRenderedImage(buffImage,null) the best way to do this?

    First read How to Use Scroll Panes:
    http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html
    You don't add your ImagePanel to the scroll pane, you set the client using the scroll pane constructor or setViewportView.
    Also you need to set the preferred size of the scroll pane to be smaller than the preferred size of your ImagePanel if you want to see the scroll bars.
    If you want to resize your image you can set a new preferred size for your ImagePanel, and then call ImagePanel.revalidate.
    You just need to change the ImagePanel a bit so it will scale the image to its preferred size.
    public class ImagePanel extends JPanel {
        private BufferedImage background;
        /** Creates a new instance of ImagePanel */
        public ImagePanel(BufferedImage image) {
            this.setBackground(image);
            setPreferredSize(new Dimension(image.getWidth(), image.getHeight()));
        public void paintComponent(Graphics graphic) {
            super.paintComponent(graphic);
            graphic.drawImage(getBackground(), 0,0,getPreferredSize().getWidth(),getPreferredSize().getHeight(), this);
        public BufferedImage getBackground() {
            return background;
        public void setBackground(BufferedImage background) {
            this.background = background;
    }If you want to draw on top of your image you can use one of the drawImage functions in [url http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Graphics2D.html]Graphics2D.

  • Cropping when moving and resizing a cropping rectangle

    I created a program that crops an image and displays the cropped image but I'm trying to add more functionality
    by making it movable and resizable. The rectangle moves and resizes but it only crops an image when user draws the rectangle and not when moved or resized. I know that the X,Y, height and width position of the rectangle would need to be updated but I'm not
    sure how I can accomplish this being new to WPF. Below is my user control "CropControl and the code behind. Also, I'm implementing my code using MVVM framework.
    XAML: 
    <UserControl x:Class="Klein_Tools_Profile_Pic_Generator.CropControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:s="clr-namespace:Klein_Tools_Profile_Pic_Generator"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
    <ControlTemplate x:Key="MoveThumbTemplate" TargetType="{x:Type s:MoveThumb}">
    <Rectangle Fill="Transparent"/>
    </ControlTemplate>
    <!-- ResizeDecorator Template -->
    <ControlTemplate x:Key="ResizeDecoratorTemplate" TargetType="{x:Type Control}">
    <Grid>
    <s:ResizeThumb Width="3" Height="7" Cursor="SizeNS" Margin="0 -4 0 0"
    VerticalAlignment="Top"/>
    <s:ResizeThumb Width="3" Height="7" Cursor="SizeWE" Margin="-4 0 0 0"
    VerticalAlignment="Stretch" HorizontalAlignment="Left"/>
    <s:ResizeThumb Width="3" Height="7" Cursor="SizeWE" Margin="0 0 -4 0"
    VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
    <s:ResizeThumb Width="3" Height="7" Cursor="SizeNS" Margin="0 0 0 -4"
    VerticalAlignment="Bottom" HorizontalAlignment="Stretch"/>
    <s:ResizeThumb Width="7" Height="7" Cursor="SizeNWSE"
    VerticalAlignment="Top" HorizontalAlignment="Left"/>
    <s:ResizeThumb Width="7" Height="7" Cursor="SizeNESW"
    VerticalAlignment="Top" HorizontalAlignment="Right"/>
    <s:ResizeThumb Width="7" Height="7" Cursor="SizeNESW"
    VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
    <s:ResizeThumb Width="7" Height="7" Cursor="SizeNWSE"
    VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
    </Grid>
    </ControlTemplate>
    <!-- Designer Item Template-->
    <ControlTemplate x:Key="DesignerItemTemplate" TargetType="ContentControl">
    <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
    <s:MoveThumb Template="{StaticResource MoveThumbTemplate}" Cursor="SizeAll"/>
    <Control Template="{StaticResource ResizeDecoratorTemplate}"/>
    <ContentPresenter Content="{TemplateBinding ContentControl.Content}"/>
    </Grid>
    </ControlTemplate>
    </UserControl.Resources>
    <Canvas x:Name="BackPanel"
    MouseLeftButtonDown="LoadedImage_MouseLeftButtonDown"
    MouseMove="LoadedImage_MouseMove"
    MouseLeftButtonUp="LoadedImage_MouseLeftButtonUp"
    Background="Transparent">
    <ContentControl x:Name="contControl" Visibility="Collapsed"
    Template="{StaticResource DesignerItemTemplate}">
    <Rectangle x:Name="selectionRectangle" Fill="#220000FF"
    IsHitTestVisible="False"/>
    </ContentControl>
    </Canvas>
    </UserControl>
    CODE BEHIND:
    namespace Klein_Tools_Profile_Pic_Generator
    /// <summary>
    /// Interaction logic for CropControl.xaml
    /// </summary>
    public partial class CropControl : UserControl
    private bool isDragging = false;
    private Point anchorPoint = new Point();
    private bool moveRect;
    TranslateTransform trans = null;
    Point originalMousePosition;
    public CropControl()
    InitializeComponent();
    //Register the Dependency Property
    public static readonly DependencyProperty SelectionProperty =
    DependencyProperty.Register("Selection", typeof(Rect), typeof(CropControl), new PropertyMetadata(default(Rect)));
    public Rect Selection
    get { return (Rect)GetValue(SelectionProperty); }
    set { SetValue(SelectionProperty, value); }
    // this is used, to react on changes from ViewModel. If you assign a
    // new Rect in your ViewModel you will have to redraw your Rect here
    private static void OnSelectionChanged(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e)
    Rect newRect = (Rect)e.NewValue;
    Rectangle selectionRectangle = d as Rectangle;
    if (selectionRectangle != null)
    return;
    selectionRectangle.SetValue(Canvas.LeftProperty, newRect.X);
    selectionRectangle.SetValue(Canvas.TopProperty, newRect.Y);
    selectionRectangle.Width = newRect.Width;
    selectionRectangle.Height = newRect.Height;
    private void LoadedImage_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    if (isDragging == false)
    anchorPoint.X = e.GetPosition(BackPanel).X;
    anchorPoint.Y = e.GetPosition(BackPanel).Y;
    Canvas.SetZIndex(selectionRectangle, 999);
    isDragging = true;
    BackPanel.Cursor = Cursors.Cross;
    private void LoadedImage_MouseMove(object sender, MouseEventArgs e)
    if (isDragging)
    double x = e.GetPosition(BackPanel).X;
    double y = e.GetPosition(BackPanel).Y;
    contControl.SetValue(Canvas.LeftProperty, Math.Min(x, anchorPoint.X));
    contControl.SetValue(Canvas.TopProperty, Math.Min(y, anchorPoint.Y));
    contControl.Width = Math.Abs(x - anchorPoint.X);
    contControl.Height = Math.Abs(y - anchorPoint.Y);
    if (contControl.Visibility != Visibility.Visible)
    contControl.Visibility = Visibility.Visible;
    private void Image_MouseMove(object sender, MouseEventArgs e)
    if (moveRect)
    trans = selectionRectangle.RenderTransform as TranslateTransform;
    if (trans == null)
    selectionRectangle.RenderTransformOrigin = new Point(0, 0);
    trans = new TranslateTransform();
    selectionRectangle.RenderTransform = trans;
    trans.Y = -(originalMousePosition.Y - e.GetPosition(BackPanel).Y);
    trans.X = -(originalMousePosition.X - e.GetPosition(BackPanel).X);
    e.Handled = false;
    private void LoadedImage_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
    if (isDragging)
    isDragging = false;
    if (contControl.Width > 0)
    //Crop.IsEnabled = true;
    //Cut.IsEnabled = true;
    BackPanel.Cursor = Cursors.Arrow;
    contControl.GetValue(Canvas.LeftProperty);
    // Set the Selection to the new rect, when the mouse button has been released
    Selection = new Rect(
    (double)contControl.GetValue(Canvas.LeftProperty),
    (double)contControl.GetValue(Canvas.TopProperty),
    contControl.Width,
    contControl.Height);

    Hello HotSawz,
    The ResizeThumb and MoveThumb is not in your code so I cannot compile. Anyway, it is not the problem.
    Anyway, can you clarify more details about "it only crops an image when user draws the rectangle and not when moved or resized", it is already normal behavoir for you to draw a rectangle and then move it. What kind of action do you want? Do you
    mean some controls like this:
    http://www.codeproject.com/Articles/23158/A-Photoshop-like-Cropping-Adorner-for-WPF
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Help - Class name and descriptions for a function location.

    Hi Guys
    i have to write a report that displays the class and class descriptions for a function location. the user passes in either the function location(TPLNR) or the class name and  the report should display the the class characteristics and resp. values. Is there a FM that i coud use?
    please help.
    many thanks.
    seelan.

    sadiepu1 wrote:
    When I set up Words with Friends on my Fire it asked for my username and password which from a previous reply to my inquiry above stated that the S 3 doesn't store due to privacy issues. I have tried all my usual combinations of usernames and passwords and my Fire won't let me access the game as it keeps telling me that one or the other is not correct. I have deleted the app from my Fire and re-downloaded it but have the same error comes up. I have accessed the Words with Friends support both on my phone and their website but there is no live chat. I might have to take both to a Verizon store. Also, my Fire won't let me access the game without a correct username and password. To say that I am frustrated would be an understatement as well I have tried everything I can think of with no luck! Thanks for any help you can give!
    Did you use facebook to log in? 
    Verizon will not be able to help you retrieve any of the information you need.  You will have to contact Zynga.

  • Creation of developement class,package and access key

    COULD ANYBODY EXPLAIN about
    creation of developement class,package and access key
    and who will create them?

    Working With Development Objects
    Any component of an application program that is stored as a separate unit in the R/3 Repository is called a development object or a Repository Object. In the SAP System, all development objects that logically belong together are assigned to the same development class.
    Object Lists
    In the Object Navigator, development objects are displayed in object lists, which contain all of the elements in a development class, a program, global class, or function group.
    Object lists show not only a hierarchical overview of the development objects in a category, but also tell you how the objects are related to each other. The Object Navigator displays object lists as a tree.
    The topmost node of an object list is the development class. From here, you can navigate right down to the lowest hierarchical level of objects. If you select an object from the tree structure that itself describes an object list, the system displays just the new object list.
    For example:
    Selecting an Object List in the Object Navigator
    To select development objects, you use a selection list in the Object Navigator. This contains the following categories:
    Category
    Meaning
    Application hierarchy
    A list of all of the development classes in the SAP System. This list is arranged hierarchically by application components, component codes, and the development classes belonging to them
    Development class
    A list of all of the objects in the development class
    Program
    A list of all of the components in an ABAP program
    Function group
    A list of all of the function modules and their components that are defined within a function group
    Class
    A list of all of the components of a global class. It also lists the superclasses of the class, and all of the inherited and redefined methods of the current class.
    Internet service
    A list of all of the componentse of an Internet service:
    Service description, themes, language resources, HTML templates and MIME objects.
    When you choose an Internet service from the tree display, the Web Application Builder is started.
    See also Integrating Internet Services.
    Local objects
    A list of all of the local private objects of a user.
    Objects in this list belong to development class $TMP and are not transported. You can display both your own local private objects and those of other users. Local objects are used mostly for testing. If you want to transport a local object, you must assign it to another development class. For further information, refer to Changing Development Classes
    http://help.sap.com/saphelp_46c/helpdata/en/d1/80194b454211d189710000e8322d00/content.htm
    Creating the Main Package
    Use
    The main package is primarily a container for development objects that belong together, in that they share the same system, transport layer, and customer delivery status. However, you must store development objects in sub-packages, not in the main package itself.
    Several main packages can be grouped together to form a structure package.
    Prerequisites
    You have the authorization for the activity L0 (All Functions) using the S_DEVELOP authorization object.
    Procedure
    You create each normal package in a similar procedure to the one described below. It can then be included as a sub-package in a main package.
    To create a main package:
    1.       Open the Package Builder initial screen (SE21 or SPACKAGE).
    2.       In the Package field, enter a name for the package that complies with the tool’s Naming Conventions
    Within SAP itself, the name must begin with a letter from A to S, or from U to X.
    3.       Choose Create.
    The system displays the Create Package dialog box.
    4.       Enter the following package attributes:
    Short Text
    Application Component
    From the component hierarchy of the SAP system, choose the abbreviation for the application component to which you want to assign the new package.
    Software component
    Select an entry. The software component describes a set of development objects that can only be delivered in a single unit. You should assign all the sub-packages of the main package to this software component.
    Exception: Sub-packages that will not be delivered to customers must be assigned to the HOMEsoftware component.
    Main Package
    This checkbox appears only if you have the appropriate authorization (see Prerequisites).
    To indicate that the package is a main package, check this box.
    5.       Choose  Save.
    6.       In the dialog box that appears, assign a transport request.
    Result
    The Change package screen displays the attributes of the new package. To display the object list for the package in the Object Navigator as well, choose  from the button bar.
    You have created your main package and can now define a structure within it. Generally, you will continue by adding sub-packages to the main package. They themselves will contain the package elements you have assigned.
    See also
    Adding Sub-Packages to the Main Package
    http://help.sap.com/saphelp_nw04/helpdata/en/ea/c05d8cf01011d3964000a0c94260a5/content.htm
    access key used for change standard program.
    www.sap.service.com

  • Upload and Resize Image not inserting filename in database

    I have a form that I created using the insert record form wizard. One of the fields is a file field and my form enctype is set to multipart/form-data. I then used the upload and resize image behavior and set the parameters. When testing the form the file uploads to the correct directory but no entry is made into the database for that particular field. The other fields are entered into the database just fine. If it helps, here is the code generated before the  tag:
    <br />
    <br /><?php require_once('../../Connections/test.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('../../includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('../../includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("../../");<br /><br />// Make unified connection variable<br />$conn_test = new KT_connection($test, $database_test);<br /><br />// Start trigger<br />$formValidation = new tNG_FormValidation();<br />$tNGs->prepareValidation($formValidation);<br />// End trigger<br /><br />//start Trigger_ImageUpload trigger<br />//remove this line if you want to edit the code by hand <br />function Trigger_ImageUpload(&$tNG) {<br />  $uploadObj = new tNG_ImageUpload($tNG);<br />  $uploadObj->setFormFieldName("picture");<br />  $uploadObj->setDbFieldName("picture");<br />  $uploadObj->setFolder("../images/");<br />  $uploadObj->setResize("true", 120, 0);<br />  $uploadObj->setMaxSize(1500);<br />  $uploadObj->setAllowedExtensions("gif, jpg, jpe, jpeg, png, bmp");<br />  $uploadObj->setRename("auto");<br />  return $uploadObj->Execute();<br />}<br />//end Trigger_ImageUpload trigger<br /><br />// Make an insert transaction instance<br />$ins_team = new tNG_insert($conn_test);<br />$tNGs->addTransaction($ins_team);<br />// Register triggers<br />$ins_team->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");<br />$ins_team->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);<br />$ins_team->registerTrigger("END", "Trigger_Default_Redirect", 99, "../team.php");<br />$ins_team->registerTrigger("AFTER", "Trigger_ImageUpload", 97);<br />// Add columns<br />$ins_team->setTable("team");<br />$ins_team->addColumn("id", "NUMERIC_TYPE", "POST", "id");<br />$ins_team->addColumn("sort", "NUMERIC_TYPE", "POST", "sort");<br />$ins_team->addColumn("name", "STRING_TYPE", "POST", "name");<br />$ins_team->addColumn("title", "STRING_TYPE", "POST", "title");<br />$ins_team->addColumn("description", "STRING_TYPE", "POST", "description");<br />$ins_team->addColumn("picture", "FILE_TYPE", "FILES", "picture");<br />$ins_team->setPrimaryKey("id", "NUMERIC_TYPE");<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rsteam = $tNGs->getRecordset("team");<br />$row_rsteam = mysql_fetch_assoc($rsteam);<br />$totalRows_rsteam = mysql_num_rows($rsteam);<br />?>

    If the reason is about memory, warning message should be happened when upload the image, because "show thumbnail" means resize at second time, how come you failed to resize the picture that system let it upload succeed at the first time by the same resize process?
    upload procedure
    a.jpg: 2722x1814, 1.2mb
    upload condition: fixed width 330px, 1.5mb
    "upload and resize" a.jpg -> file upload -> "resize engine" -> passed (but not work and no warning message)
    "show thumbnail" a.jpg -> "resize engine" -> failed (not enough memory)
    it doesn't make sense.
    and you miss an important key point, I upload the same picture myself, and resize work, so I said it happened at random, and that's why I am so worried.

  • From which table I can find the "Class type" and "Class" of the material?

    From which table I can find the "Class type" and "Class" of the material?
    Thanks in advance for the answers....

    Hi,
    try following table
    KSSK     Material number to class     
    KLAS     Class description     
    KSML     Characteristic name     
    CABN/CABNT     Characteristic name description     
    CAWN/CAWNT     Characteristic name
    [http://www.sap-img.com/materials/classification-view-of-material-master.htm]
    [http://wiki.sdn.sap.com/wiki/display/ERPLO/FrequentlyUsedTables]
    Regards
    kailas Ugale

  • How do I allow the user to select and resize the CNiGraph while executing?

    I am writing an application with Measurement Studio and Visual C++ that will allow the user to create graphs on the fly. I need to give them the capability to select a graph and resize it in a manner consistent with most other Windows programs (i.e. resize handles). I have tried various implementations of the CRectTracker class and can get it to work for Microsoft controls, but I can not get it to work with the CNiGraph (the only one I have tried so far). The code runs but I never get the selection box or handles around the control. Is there a way to do this and is there an example anywhere that I can go from? Any help would be appreciated.

    Never mind. I have now found the way to do this.

  • Stop JPanel auto positioning and resizing in Netbeans

    Hi,
    I'm working on a Swing application in Netbeans. In my program I had several JPanels. At any one time, only one JPanel is visible.
    I dragged my JPanels to the JFrame in the Swing editor. Each time the user clicks on the switch function button, another JPanel should be displayed.
    However, the new panel does not display correctly. It remained at the position where I had dragged (randomly) on Netbeans, instead of the new size and location I set it to prior to setting it visible. I tried to tinker with it, and realized that Netbeans helped me reposition my JPanel back to its original position. For my function to work, I suspect I should disable auto positioning and resizing.
    How do I turn it off?
    Thanks in advance,
    eddy05

    eddy05 wrote:
    That's what the JComponent.setSize() and JComponent.setLocation() do right, to resize and relocate JComponents and its subclasses.This only sets the properties of that particular JComponent. The layout manager of the container that holds it can choose to use these properties or not depending on what layout manager is being used.
    I wanted to perform the above functions, but Netbeans' behaviour keeps interfering, hence my request on how the behaviour can be turned off =)By dropping a JPanel into your JFrame (the JFrame's contentPane actually), NetBeans is by default going to use the GroupLayout, and the properties of the JComponent noted above will be ignored. One solution alluded to above is to have the JFrame's contentPane use a null layout, but while this might work in the short run, in the long run it will hurt you. Better is to read up on the various layout managers available for your use in the Sun Swing tutorials and start to play with them in your code.

  • Alternate display and mp4 files

    Hi,
    I regularly use my MacBook (OS X Leopard) in a large lecture hall with a ceiling-mounted projector. The presentations have often been prepared on my iMac G5 with Tiger, but that's no problem. I use "alternate display to view presenter information." Last week, I inserted some mp4 files into some empty slides in my sequence...it worked brilliantly at home (the files started up automatically, played, and then finished, at which point I just hit my right arrow key, which took me to my next text slide). When I went to class and hooked up the MacBook to the projector, everything was fine until I hit the key to advance to a slide with an embedded mp4. The Keynote window was immediately gone and I was left with a view of my desktop...nothing happened. Interestingly enough, Keynote had not quit. Its icon had a miniature green "play" button on it (as you would expect on a CD player, etc.). The only way for me to salvage the presentation -- as class was about to start -- was to run the presentation with display mirroring. I lost the opportunity to have my presenter notes, but advancing to and past the slides with mp4 video clips was no problem at all.
    Does anyone know what happened here and how I might go about troubleshooting? Did I do something that the projector could not handle? Are there resolution settings for both displays that I should pay attention to here? As previously mentioned, I've never had a problem with alternate display and presenter notes in this hall or with any other projector on campus; that's why I assume that the mp4s were part of the problem.
    Much obliged for any help whatsoever,
    Hank

    Check Keynote Preferences > General and be sure the box "Copy audio and movies into document" is checked. Other than that, I have no suggestions.
    Good luck.

  • Missing BitmapData class in code completion - Flex(FP10)

    I’ve setup my Flex Builder for Flex 3.3 SDK and Flash Player 10 as described in this article. I noticed that BitmapData class doesn’t show anymore. Is this a bug?
    I took a snapshot of my flex builder code completion.
    Any thoughts on this?
    Thanks for your help.
    Mariush T.

    Thanks Michael, it works now.
    For anybody who has the same problem:
    1. Download Flex SDK zip file.
    2. Uninstall current Flash Player.
    3. Install Flash Player from /runtimes/player/10/win/
    Mariush T.

  • Adobe Air is very smiller than Zinc App - Reposition and Resize not working?

    Hello guys, i have found and readden nice solution like NativeWindow was saved positions and sizes If i close Adobe Air App and i open again like NativeWindow was moved and resized. It is very simple working. And it works fine. 100 % Good! But how does it work with Zinc App because it doesn't work for positions and sizes. How do i fix? I have upgraded code from FileSerializer.as With mdm.Script:
    package
      import flash.events.Event;
      import flash.net.URLRequest;
      import flash.net.URLStream;
      import flash.utils.ByteArray;
      import mdm.Application;
      import mdm.FileSystem;
      import mdm.System;
      public class FileSerializer
      public static function WriteObjectToFile(object:Object, filename:String):void
      var fileExists:Boolean = mdm.FileSystem.fileExists(mdm.Application.path+filename);
      var outByte:ByteArray = new ByteArray();
      outByte.writeObject(object);
      if(fileExists == false)
      mdm.FileSystem.saveFile(mdm.Application.path+filename, "");
      mdm.FileSystem.BinaryFile.setDataBA(outByte);
      mdm.FileSystem.BinaryFile.writeDataBA(mdm.Application.path+filename);
      private static var stream:URLStream;
      public static function ReadObjectfromFile(filename:String):Object
      var fileExists:Boolean = mdm.FileSystem.fileExists(mdm.Application.path+filename);
      if(fileExists == false)
      var obj:Object;
      stream = new URLStream();
      stream.addEventListener(Event.COMPLETE, function(evt:Event):void
      obj = stream.readObject();
      stream.close();
      stream.load(new URLRequest(filename));
      return obj;
      return null;
    That is improved to mdm.Script and it saves sometimes.
    And i have create UserPref.as
    package
      public class UserPref
      public var zincForm:String = "MainForm";
      public var zincType:String = "sizeablestandard";
      //public var zincSWF:String = "MainApp.swf";
      public var zincPosX:Number;
      public var zincPosY:Number;
      public var zincWidth:Number;
      public var zincHeight:Number;
    And i create MainApp.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      layout="absolute" applicationComplete="applicationCompleteHandler(event)" creatingComplete="creationCompleteHandler(event)">
      <fx:Script>
      <![CDATA[
      import mdm.Application;
      import mdm.Event;
      import mdm.Forms;
      import mdm.mdmForm;
      import mx.events.FlexEvent;
      private var up:UserPref;
      private var form:mdmForm;
      protected function applicationCompleteHandler(event:FlexEvent):void
      mdm.Application.init();
      this.up.zincPosX = this.form.x;
      this.up.zincPosY = this.form.y;
      this.up.zincWidth = this.form.width;
      this.up.zincHeight = this.form.height;
      FileSerializer.WriteObjectToFile(this.up, "pref.zup");
      mdm.Application.onAppExit = function (appevt:flash.events.Event):void
      mdm.Application.exit();
      mdm.Application.enableExitHandler();
      protected function creationCompleteHandler(event:flash.events.Event):void
      this.up = FileSerializer.ReadObjectfromFile("pref.zup") as UserPref;
      if(up) {
      mdm.Application.onFormReposition = function(rpevt:mdm.Event):void
      this.form.x = up.zincPosX;
      this.form.y = up.zincPosY;
      mdm.Application.onFormResize = function(rsevt:mdm.Event):void
      this.form.width = up.zincWidth;
      this.form.height = up.zincHeight;
      }else
      this.up = new UserPref();
      ]]>
      </fx:Script>
      <fx:Declarations>
      <!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
      </fx:Declarations>
    </mx:Application>
    And i recompile with Zinc Studio 4.0.22 than i try reposition and resize with Zinc Window than i close since saved files and i open again. But why does it not reposition and resize?
    How do i fix? Can somebody help me?
    Thanks best regards Jens Eckervogt

    I little more searching and I found the answer. Check it out here:
    http://forums.adobe.com/message/2879260#2879260

  • Tool for viewing the loaded classes, defining and initiating ClassLoaders

    Many modern Java based servers and tools such as IDEs employ a complex/hierarchical class loader architecture for modularity and isolation. Many Java debuggers have ability to display loaded classes. However sometimes it is neccesary to view defining and initiating class loaders to debug class loading related issues. I have developed an extension module for Netbeans JPDA debugger to display such information. Please read my blog here:
    http://blogs.sun.com/scblog/entry/updated_view_classes_and_classloader
    if you are interested in such a tool.

    Can anyone give me pointers on how I could write an agent to dump information about loaded classes, defining and initiating ClassLoaders on:
    JVMTI_EVENT_DATA_DUMP_REQUEST
    event.
    Also can similar information be obtained from heap dumps generated by:
    $ jmap -dump:format=b,file=heap.bin <pid>
    May be using OQL supported by jhat.
    thanks,
    Sandip

  • Re: Beginner needs help using a array of class objects, and quick

    Dear Cynthiaw,
    I just read your Beginner needs help using a array of class objects, and quick of Dec 7, 2006 9:25 PM . I really like your nice example.
    I also want to put a question on the forum and display the source code of my classe in a pretty way as you did : with colors, indentation, ... But how ? In html, I assume. How did you generate the html code of your three classes ? By help of your IDE ? NetBeans ? References ?
    I already posted my question with six source code classes ... in text mode --> Awful : See "Polymorphism did you say ?"
    Is there a way to discard and replace a post (with html source code) in the Sun forum ?
    Thanks for your help.
    Chavada

    chavada wrote:
    Dear Cynthiaw,
    I just read your Beginner needs help using a array of class objects, and quick of Dec 7, 2006 9:25 PM . I really like your nice example.You think she's still around almost a year later?
    I also want to put a question on the forum and display the source code of my classe in a pretty way as you did : with colors, indentation, ... But how ?Just use [code] and [/code] around it, or use the CODE button
    [code]
    public class Foo() {
      * This is the bar method
      public void bar() {
        // do stuff
    }[/code]

Maybe you are looking for