JScrollPane image resizing

Hi, i've a JScrollPane into my class "Scroll image" I want that the imageicon automatically is resized when i move the border of JscrollPane, i do not suceed to do this. help me.
<code>
* scroll_image.java
* Created on 31 maggio 2004, 13.26
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.geom.*;
public class scroll_image extends JPanel implements ChangeListener{
JScrollPane si;
int max_w = 300 ;
int max_h = 300;
ImageIcon def;
JLabel et;
ImageIcon tmp;
BorderLayout lay = new BorderLayout();
public scroll_image(BufferedImage buf) {
this.setLayout(lay);
tmp = new ImageIcon(buf);
Image im = tmp.getImage();
Dimension d = getScaledSize(tmp);
def = new ImageIcon (im.getScaledInstance(d.width, d.height, Image.SCALE_SMOOTH) ) ;
et = new JLabel(def);
et.setBounds(0, 0, d.width, d.height);
si = new JScrollPane(et);
si.revalidate();
si.setVisible(true);
add (BorderLayout.CENTER, si);
this.revalidate();
this.setVisible(true);
private Dimension getScaledSize(ImageIcon image) {
double imageRatio =
(double)image.getIconWidth() / (double)image.getIconHeight();
if ( imageRatio > 1.0)
return new Dimension( max_w,(int)(((double)max_h)/imageRatio) );
else
return new Dimension( (int)(((double)max_w)*imageRatio), max_h );
public scroll_image get_scroll_image (){
return this;
public void paintComponent (Graphics g){
setOpaque(false);
revalidate();
Dimension ddd = this.getSize();
g.drawImage(def.getImage(), 0, 0, ddd.width, ddd.height, null);
public void stateChanged(javax.swing.event.ChangeEvent ae) {
revalidate();
paintComponent(getGraphics());
</code>
How many errors i've done? where?
Thank you.

That was a joke referring to the fact that you posted the same message many times.
I don't understand your requirements for a JScrollPane, but here is a resizable icon:
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.io.*;
import java.net.*;
import javax.imageio.*;
import javax.swing.*;
public class ResizableImageIcon implements Icon {
    private BufferedImage original, latest;
    public ResizableImageIcon(BufferedImage original, JLabel label) {
        if (original == null)
            throw new NullPointerException();
        this.original = this.latest = original;
        setIconFor(label);
    //ICON METHODS
    public int getIconWidth() {
        return latest.getWidth();
    public int getIconHeight() {
        return latest.getHeight();
    public void paintIcon(Component c, Graphics g, int x, int y) {
        AffineTransform xform = AffineTransform.getTranslateInstance(x,y);
        ((Graphics2D)g).drawRenderedImage(latest, xform);
    //CLASS METHODS
    public void setMaxSize(int w, int h) {
        if (w == getIconWidth() && h == getIconHeight())
            return;
        double factor = Math.min(w/(double)original.getWidth(), h/(double)original.getHeight());
        latest = ImageUtilities.getScaledInstance(original, factor, null);
    private void setIconFor(JLabel label) {
        label.setIcon(this);
        label.addComponentListener(new ComponentAdapter(){
            public void componentResized(ComponentEvent e) {
                JLabel l = (JLabel) e.getComponent();
                Insets insets = l.getInsets();
                int w = l.getWidth() - insets.left - insets.right;
                int h = l.getHeight() - insets.top - insets.bottom;
                setMaxSize(w, h);
                l.setIcon(ResizableImageIcon.this); //causes repaint?
                l.repaint();
    //SAMPLE
    public static void main(String[] args) throws IOException {
        URL url = new URL("http://today.java.net/jag/bio/JagHeadshot-small.jpg");
        JLabel label = new JLabel((Icon)null);
        label.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
        new ResizableImageIcon(ImageIO.read(url), label);
        JFrame f = new JFrame("ResizableImageIcon");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(label);
        f.pack();
        f.setLocationRelativeTo(null);
        f.setVisible(true);
}And here is the utility code.
import java.awt.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.io.*;
import java.net.*;
import javax.imageio.*;
import javax.swing.*;
public class ImageUtilities {
    public static void loadImage(Image image, Component c) {
        try {
            if (image instanceof BufferedImage)
                return; //already buffered
            MediaTracker tracker = new MediaTracker(c);
            tracker.addImage(image, 0);
            tracker.waitForID(0);
            if (MediaTracker.COMPLETE != tracker.statusID(0, false))
                throw new IllegalStateException("image loading fails");
        } catch (InterruptedException e) {
            throw new RuntimeException("interrupted", e);
    public static ColorModel getColorModel(Image image) {
        try {
            PixelGrabber gabby = new PixelGrabber(image, 0, 0, 1, 1, false);
            if (!gabby.grabPixels())
                throw new RuntimeException("pixel grab fails");
            return gabby.getColorModel();
        } catch (InterruptedException e) {
            throw new RuntimeException("interrupted", e);
    public static BufferedImage toBufferedImage(Image image, GraphicsConfiguration gc) {
        if (image instanceof BufferedImage)
            return (BufferedImage) image;
        loadImage(image, new Label());
        ColorModel cm = getColorModel(image);
        int transparency = cm.getTransparency();
        int w = image.getWidth(null);
        int h = image.getHeight(null);
        if (gc == null)
            gc = getDefaultConfiguration();
        BufferedImage result = gc.createCompatibleImage(w, h, transparency);
        Graphics2D g = result.createGraphics();
        g.drawImage(image, 0, 0, null);
        g.dispose();
        return result;
    public static GraphicsConfiguration getDefaultConfiguration() {
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice gd = ge.getDefaultScreenDevice();
        return gd.getDefaultConfiguration();
    public static BufferedImage copy(BufferedImage source, BufferedImage target, Object interpolationHint) {
        Graphics2D g = target.createGraphics();
        g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, interpolationHint);
        double scalex = (double) target.getWidth() / source.getWidth();
        double scaley = (double) target.getHeight() / source.getHeight();
        AffineTransform at = AffineTransform.getScaleInstance(scalex, scaley);
        g.drawRenderedImage(source, at);
        g.dispose();
        return target;
    public static BufferedImage getScaledInstance2D(BufferedImage source, double factor, Object interpolationHint, GraphicsConfiguration gc) {
        if (gc == null)
            gc = getDefaultConfiguration();
        int w = (int) (source.getWidth() * factor);
        int h = (int) (source.getHeight() * factor);
        int transparency = source.getColorModel().getTransparency();
        return copy(source, gc.createCompatibleImage(w, h, transparency), interpolationHint);
    public static Image getScaledInstanceAWT(BufferedImage source, double factor, int hint) {
        int w = (int) (source.getWidth() * factor);
        int h = (int) (source.getHeight() * factor);
        return source.getScaledInstance(w, h, hint);
    //best of breed
    public static BufferedImage getScaledInstance(BufferedImage source, double factor, GraphicsConfiguration gc) {
         if (factor >= 1.0)
             return getScaledInstance2D(source, factor, RenderingHints.VALUE_INTERPOLATION_BICUBIC, gc);
         else {
             Image image = getScaledInstanceAWT(source, factor, Image.SCALE_AREA_AVERAGING);
             return toBufferedImage(image, gc);
}

Similar Messages

  • Ways to implement image resizing using plug-ins?

    Hi Photoshop developers,
    I'm a developer with a few Photoshop filter and selection plug-ins under my belt, and I have a good understanding of the SDK and tools and suites it provides. My next project is an algorithm for enlarging/resampling images to different pixel dimensions. I'm wondering if anyone has any suggestions for or experience with the best combination of plug-in types to implement this.
    Clearly, I can't just write it as a filter plug-in, since there is no way to change the image dimensions from within a filter.
    I'd like the resized image to remain within Photoshop (as a new window or in the original one), so an export plug-in on its own is not sufficient.
    Import plug-ins seem promising, since they allow the creation of a new document of the required size. However, as best I can tell from the Photoshop 6.0 SDK documentation, import plug-ins cannot access the image data from other open documents (or even the clipboard), nor do they provide any support for channel ports and the Channel Port suite.
    My best idea at this stage is to create an export plug-in to provide the user interface and calculate the resized image, and then an import plug-in to import the resized image back into a new window. (I'm supposing a further automation plug-in would then be written to perform this export/import sequence.) The difficulty I see with this approach is how to communicate the resized image data between the two plug-ins. Since the resized image will potentially be very large, the ideal solution would be to store it in channels managed by the Channel Ports suite. However, I cannot see how the channel ports created in the export plug-in could be communicated to and used by an import plug-in. The alternative would be for the export plug-in to save the resized image to a temporary file on disk, however this seems unnecessary.
    So, my questions, specifically, are:
    a) Is it possible to create new channels using the Channel Ports suite (sPSChannelPorts->New()) in one plug-in, and have those channels persist to be used in another plug-in?
    b) If so, how would the channel ports be communicated between the plug-ins?
    c) Alternately, are there any alternative architectures available for implementing an image-resizing algorithm using the plug-in types that are available for Photoshop developers.
    Any responses would be greatly appreciated; I know this is a low-traffic forum...
    Thanks,
    Matthew.

    I would make an automation plug-in and a filter plug-in.<br /><br />1) Run the automation which runs your filter to gather current image <br />information<br />2) Create a temp file of the new document<br />3) Make a new document<br />4) Call the filter again to reload the temp data on disk<br /><br /><[email protected]> wrote in message <br />news:[email protected]...<br />> Hi Photoshop developers,<br />><br />> I'm a developer with a few Photoshop filter and selection plug-ins under <br />> my belt, and I have a good understanding of the SDK and tools and suites <br />> it provides. My next project is an algorithm for enlarging/resampling <br />> images to different pixel dimensions. I'm wondering if anyone has any <br />> suggestions for or experience with the best combination of plug-in types <br />> to implement this.<br />><br />> Clearly, I can't just write it as a filter plug-in, since there is no way <br />> to change the image dimensions from within a filter.<br />><br />> I'd like the resized image to remain within Photoshop (as a new window or <br />> in the original one), so an export plug-in on its own is not sufficient.<br />><br />> Import plug-ins seem promising, since they allow the creation of a new <br />> document of the required size. However, as best I can tell from the <br />> Photoshop 6.0 SDK documentation, import plug-ins cannot access the image <br />> data from other open documents (or even the clipboard), nor do they <br />> provide any support for channel ports and the Channel Port suite.<br />><br />> My best idea at this stage is to create an export plug-in to provide the <br />> user interface and calculate the resized image, and then an import plug-in <br />> to import the resized image back into a new window. (I'm supposing a <br />> further automation plug-in would then be written to perform this <br />> export/import sequence.) The difficulty I see with this approach is how to <br />> communicate the resized image data between the two plug-ins. Since the <br />> resized image will potentially be very large, the ideal solution would be <br />> to store it in channels managed by the Channel Ports suite. However, I <br />> cannot see how the channel ports created in the export plug-in could be <br />> communicated to and used by an import plug-in. The alternative would be <br />> for the export plug-in to save the resized image to a temporary file on <br />> disk, however this seems unnecessary.<br />><br />> So, my questions, specifically, are:<br />><br />> a) Is it possible to create new channels using the Channel Ports suite <br />> (sPSChannelPorts->New()) in one plug-in, and have those channels persist <br />> to be used in another plug-in?<br />><br />> b) If so, how would the channel ports be communicated between the <br />> plug-ins?<br />><br />> c) Alternately, are there any alternative architectures available for <br />> implementing an image-resizing algorithm using the plug-in types that are <br />> available for Photoshop developers.<br />><br />> Any responses would be greatly appreciated; I know this is a low-traffic <br />> forum...<br />><br />> Thanks,<br />> Matthew.

  • Images as Buttons and Image Resizing in mxml

    Sorry for all the questions but I've run into a problem when trying to create buttons that are just an image in mxml. When I first tried this I couldn't find a way to get the border around the button to dissapear so it ended up looking like my image had an extra black border around it. Then someone here suggested I just set the buttonMode property of an mx:Image to true which ended up working fine to a point. The problem I'm having is that even if I make the tabEnabled property of the image (that I'm using as a button) true, I can't tab over to it. Is there a way to either get rid of the black borders of a button or to make it so I can tab over to an image I'm using as a button?
    My second question has to do with image resizing. Lets say I have an image of a horizontal line that I want to put at the top of the mxml page, and I want it to extend the full length of the page, even after the user has resized the browser. Is there a way to do that? I've tried putting the width as 100% or giving the image a "left" and "right" value so that presumably it would be stretched to fit within those but nothing has worked so far. Is there no way to do this or am I doing something wrong?
    Thank you for any help you guys can give.

    Of course, sorry about that. So the following is a barebones example of how I currently implement buttons and images as buttons:
    <mx:Button id="facebookButton" icon="@Embed(source='image.png')" width="30"/>
    <mx:Image buttonMode="true" id="button" source="anotherimage.png" enabled="true" click="{foo()}"/>
    And within the image I've tried making the tabFocusEnabled property true but to no avail.
    The following is how I've tried stretching out an image across the whole page:
    <mx:Image source="yetanotherimage.png" width="100%" scaleContent="true"/>
    <mx:Image source="yetanotherimage.png" left="10" right="10" scaleContent="true"/>
    Is this more helpful?

  • Why won't Photoshop revert to earlier history state after image resize when scripted?

    I've written an Applescript to automate watermarking and resizing images for my company. Everything generally works fine — the script saves the initial history state to a variable, resizes the image, adds the appropriate watermark, saves off a jpeg, then reverts to the initial history state for another resize and watermark loop.
    The problem is when I try not to use a watermark and only resize by setting the variable `wmColor` to `"None"` or `"None for all"`. It seems that after resizing and saving off a jpeg, Photoshop doesn't like it when I try to revert to the initial history state. This is super annoying, since clearly a resize should count as a history step, and I don't want to rewrite the script to implement multiple open/close operations on the original file. Does anyone know what might be going on? This is the line that's generating the problem (it's in both the doBig and doSmall methods, and throws an error every time I ask it just to do an image resize and change current history state):
                        set current history state of current document to initialState
    and here's the whole script:
    property type_list : {"JPEG", "TIFF", "PNGf", "8BPS", "BMPf", "GIFf", "PDF ", "PICT"}
    property extension_list : {"jpg", "jpeg", "tif", "tiff", "png", "psd", "bmp", "gif", "jp2", "pdf", "pict", "pct", "sgi", "tga"}
    property typeIDs_list : {"public.jpeg", "public.tiff", "public.png", "com.adobe.photoshop-image", "com.microsoft.bmp", "com.compuserve.gif", "public.jpeg-2000", "com.adobe.pdf", "com.apple.pict", "com.sgi.sgi-image", "com.truevision.tga-image"}
    global myFolder
    global wmYN
    global wmColor
    global nameUse
    global rootName
    global nameCount
    property myFolder : ""
    -- This droplet processes files dropped onto the applet
    on open these_items
      -- FILTER THE DRAGGED-ON ITEMS BY CHECKING THEIR PROPERTIES AGAINST THE LISTS ABOVE
              set wmColor to null
              set nameCount to 0
              set nameUse to null
              if myFolder is not "" then
                        set myFolder to choose folder with prompt "Choose where to put your finished images" default location myFolder -- where you're going to store the jpgs
              else
                        set myFolder to choose folder with prompt "Choose where to put your finished images" default location (path to desktop)
              end if
              repeat with i from 1 to the count of these_items
                        set totalFiles to count of these_items
                        set this_item to item i of these_items
                        set the item_info to info for this_item without size
                        if folder of the item_info is true then
      process_folder(this_item)
                        else
                                  try
                                            set this_extension to the name extension of item_info
                                  on error
                                            set this_extension to ""
                                  end try
                                  try
                                            set this_filetype to the file type of item_info
                                  on error
                                            set this_filetype to ""
                                  end try
                                  try
                                            set this_typeID to the type identifier of item_info
                                  on error
                                            set this_typeID to ""
                                  end try
                                  if (folder of the item_info is false) and (alias of the item_info is false) and ((this_filetype is in the type_list) or (this_extension is in the extension_list) or (this_typeID is in typeIDs_list)) then
      -- THE ITEM IS AN IMAGE FILE AND CAN BE PROCESSED
      process_item(this_item)
                                  end if
                        end if
              end repeat
    end open
    -- this sub-routine processes folders
    on process_folder(this_folder)
              set these_items to list folder this_folder without invisibles
              repeat with i from 1 to the count of these_items
                        set this_item to alias ((this_folder as Unicode text) & (item i of these_items))
                        set the item_info to info for this_item without size
                        if folder of the item_info is true then
      process_folder(this_item)
                        else
                                  try
                                            set this_extension to the name extension of item_info
                                  on error
                                            set this_extension to ""
                                  end try
                                  try
                                            set this_filetype to the file type of item_info
                                  on error
                                            set this_filetype to ""
                                  end try
                                  try
                                            set this_typeID to the type identifier of item_info
                                  on error
                                            set this_typeID to ""
                                  end try
                                  if (folder of the item_info is false) and (alias of the item_info is false) and ((this_filetype is in the type_list) or (this_extension is in the extension_list) or (this_typeID is in typeIDs_list)) then
      -- THE ITEM IS AN IMAGE FILE AND CAN BE PROCESSED
      process_item(this_item)
                                  end if
                        end if
              end repeat
    end process_folder
    -- this sub-routine processes files
    on process_item(this_item)
              set this_image to this_item as text
              tell application id "com.adobe.photoshop"
                        set saveUnits to ruler units of settings
                        set display dialogs to never
      open file this_image
                        if wmColor is not in {"None for all", "White for all", "Black for all"} then
                                  set wmColor to choose from list {"None", "None for all", "Black", "Black for all", "White", "White for all"} with prompt "What color should the watermark be?" default items "White for all" without multiple selections allowed and empty selection allowed
                        end if
                        if wmColor is false then
                                  error number -128
                        end if
                        if nameUse is not "Just increment this for all" then
                                  set nameBox to display dialog "What should I call these things?" default answer ("image") with title "Choose the name stem for your images" buttons {"Cancel", "Just increment this for all", "OK"} default button "Just increment this for all"
                                  set nameUse to button returned of nameBox -- this will determine whether or not to increment stem names
                                  set rootName to text returned of nameBox -- this will be the root part of all of your file names
                                  set currentName to rootName
                        else
                                  set nameCount to nameCount + 1
                                  set currentName to rootName & (nameCount as text)
                        end if
                        set thisDocument to current document
                        set initialState to current history state of thisDocument
                        set ruler units of settings to pixel units
              end tell
      DoSmall(thisDocument, currentName, initialState)
      DoBig(thisDocument, currentName, initialState)
              tell application id "com.adobe.photoshop"
                        close thisDocument without saving
                        set ruler units of settings to saveUnits
              end tell
    end process_item
    to DoSmall(thisDocument, currentName, initialState)
              tell application id "com.adobe.photoshop"
                        set initWidth to width of thisDocument
                        if initWidth < 640 then
      resize image thisDocument width 640 resample method bicubic smoother
                        else if initWidth > 640 then
      resize image thisDocument width 640 resample method bicubic sharper
                        end if
                        set myHeight to height of thisDocument
                        set myWidth to width of thisDocument
                        if wmColor is in {"White", "White for all"} then
                                  set wmFile to (path to resource "water_250_white.png" in bundle path to me) as text
                        else if wmColor is in {"Black", "Black for all"} then
                                  set wmFile to (path to resource "water_250_black.png" in bundle path to me) as text
                        end if
                        if wmColor is not in {"None", "None for all"} then
      open file wmFile
                                  set wmDocument to current document
                                  set wmHeight to height of wmDocument
                                  set wmWidth to width of wmDocument
      duplicate current layer of wmDocument to thisDocument
                                  close wmDocument without saving
      translate current layer of thisDocument delta x (myWidth - wmWidth - 10) delta y (myHeight - wmHeight - 10)
                                  set opacity of current layer of thisDocument to 20
                        end if
                        set myPath to (myFolder as text) & (currentName) & "_640"
                        set myOptions to {class:JPEG save options, embed color profile:false, quality:12}
      save thisDocument as JPEG in file myPath with options myOptions appending lowercase extension
                        set current history state of current document to initialState
              end tell
    end DoSmall
    to DoBig(thisDocument, currentName, initialState)
              tell application id "com.adobe.photoshop"
                        set initWidth to width of thisDocument
                        if initWidth < 1020 then
      resize image thisDocument width 1020 resample method bicubic smoother
                        else if initWidth > 1020 then
      resize image thisDocument width 1020 resample method bicubic sharper
                        end if
                        set myHeight to height of thisDocument
                        set myWidth to width of thisDocument
                        if wmColor is in {"White", "White for all"} then
                                  set wmFile to (path to resource "water_400_white.png" in bundle path to me) as text
                        else if wmColor is in {"Black", "Black for all"} then
                                  set wmFile to (path to resource "water_400_black.png" in bundle path to me) as text
                        end if
                        if wmColor is not in {"None", "None for all"} then
      open file wmFile
                                  set wmDocument to current document
                                  set wmHeight to height of wmDocument
                                  set wmWidth to width of wmDocument
      duplicate current layer of wmDocument to thisDocument
                                  close wmDocument without saving
      translate current layer of thisDocument delta x (myWidth - wmWidth - 16) delta y (myHeight - wmHeight - 16)
                                  set opacity of current layer of thisDocument to 20
                        end if
                        set myPath to (myFolder as text) & (currentName) & "_1020"
                        set myOptions to {class:JPEG save options, embed color profile:false, quality:12}
      save thisDocument as JPEG in file myPath with options myOptions appending lowercase extension
                        set current history state of current document to initialState
              end tell
    end DoBig

    As many others here I use JavaScript so I can’t really help you with your problem.
    But I’d like to point to »the lazy person’s out« – with many operations that result in creating a new file on disk I simply duplicate the image (and flatten in the same step) to minimize any chance of damaging the original file if the Script should not perform as expected.

  • Image resizing in Smartforms?? or ADOBE

    Hello All,
    I am working on creating a smartform. It includes displaying images in the output. There could be different
    smartforms displaying the same image but with different sizes.
    I know of the solution to resize the image using picture editor and upload using SE78, which is then accessed in the smartform. But I want to avoid multiple sizes of same images in the MIME repository.
    Is there a possibility of image resizing in the smartform ? If yes, then how ? I have tried changing the DPI in General attributes of the graphic node in smartform but it does not resize the image.
    If not, then is it possible in ADOBE forms ?
    Regards,
    Subodh S.Rao

    Hi Subuodh,
    Please refer to the gabriels answer in the below link.
    http://scn.sap.com/thread/506094
    Other Ways of doing.
    http://wiki.sdn.sap.com/wiki/display/ABAP/SE78+And+OAER+bmp+Image+Creating
    Hope it will help.
    Regards,
    Amit

  • PHP -Mysql image resize and upload

    All,
    Any good ideas, code out there to help me do a PHP MySQL image resize, uploade and display? Thanks for your help!

    For upload image, u may look at the similar thread HERE

  • Permissions issue with image resize

    Ok I'm hoping someone may be able to help with this because it is really frustrating.
    I realise this issue has already been posted in these forums however there was no solution offered that has rectified it for me.  I am getting an error when trying to display thumbnails        "Error converting image (create thumbnail). The "" folder has no write permissions".  And this error when trying to upload and resize images "Image upload error. Error resizing image: Error converting image (image resize). The "" folder has no write permissions. (IMG_RESIZE)". All folders on server have full read, write and execute permissions, so I am really confused why this happenning.  I have removed and updated the includes folder on the server with no joy.  I altered the tNG_custom.class.php, tNG_insert.class.php, tNG_update.class.php files to remove the tNG_fields line to just tNG as this was throwing errors with PHP5.3.  I also changed everything else per http://forums.adobe.com/message/2357443#2357443.
    This is the tNG execution trace (why the tNGUNKNOWN??):-
    tNGUNKNOWN.executeTransaction
    STARTER.Trigger_Default_Starter
    tNGUNKNOWN.doTransaction
    BEFORE.Trigger_Default_FormValidation
    BEFORE.Trigger_CheckForbiddenWords
    tNG_insert.prepareSQL
    tNGUNKNOWN.executeTransaction - execute sql
    tNG_insert.postExecuteSql
    AFTER.Trigger_ImageUploadtNGUNKNOWN.afterUpdateField - DefaultPic, P8280176.JPG*
    ERROR.Trigger_LinkTransactionstNGUNKNOWN.doTransaction
    tNGUNKNOWN.executeTransaction
    tNGUNKNOWN.getRecordset
    tNGUNKNOWN.getFakeRsArr
    tNG_insert.getLocalRecordset
    tNGUNKNOWN.getFakeRecordset
    tNGUNKNOWN.getFakeRecordset
    tNGUNKNOWN.getRecordset
    tNGUNKNOWN.getFakeRsArr
    tNG_insert.getLocalRecordset
    tNGUNKNOWN.getFakeRecordset
    tNGUNKNOWN.getFakeRecordset
    And is causing the following php warnings when executed:-
    Warning: Parameter 2 to Trigger_Default_FormValidation() expected to be a reference, value given /testing/includes/tng/tNG.class.php on line 228 Warning: preg_split(): No ending matching delimiter ']' found in /testing/includes/common/lib/image/KT_Image.class.php on line 2034 Warning: array_pop() expects parameter 1 to be array, boolean given in /testing/includes/common/lib/image/KT_Image.class.php on line 2035 Warning: implode(): Invalid arguments passed in /testing/includes/common/lib/image/KT_Image.class.php on line 203
    Is it the preg_split() that is causing the issues here??
    Any Ideas?

    Hello BoarderLineLtd
    I have noticed that on some servers when you upload the first image to the images folder using the ADDT image upload function the thumbnail directory that gets written to the images directory is written but the permissions are not set.
    If you use an FTP program such as CuteFTP or WSFTP to login to your web site you can manually set the permissions for the thumbnail directory.
    This should eliminate the permissions error.
    Stan Forrest
    Senior Web Developer
    Digital Magic Show

  • PSE newbie frustrated, please help with image resizing

    Hi!
    Tutorials aren't helping me, nor is trial and error. I just want to resize some photos I downloaded to my computer, then upload them to a website to use as my avatar or signature. There are specific pixel dimensions I must adhere to. I want to keep the photo in it's entirety, but when I resize it, it distorts a bit, looks fuzzy...
    I can't figure out what the heck I am doing wrong. Some pictures turn out just fine and others look really bad. I know it can be done because I've seen the same pictures I'm trying to size, being used for the same thing I want to use them for, but theirs are clear, absolutely no distortion whatsoever. The pixel dimensions I have to work with are either 100x100, or 450 pixels wide by 90 pixels high.
    I hope this made sense, I'm not sure how else to word it. Please forgive my ignorance, I've really been trying.
    Thank-you
    B

    For an avatar it’s possibly best to crop to begin with so you get a true square.
    Open the image and select the crop tool and change the aspect ratio to 1 x 1 or 5 x 5 then drag out a square and move the image around inside it or drag the bounding box borders until you have it looking as you want. Then click the green check mark.
    On the top menu click Image > Resize > Image Size and in either the height or width box type 100 px (you only need to type the dimension once the other box will change to 100 automatically. Make sure you have the bottom three boxes checked:
    Scale Styles
    Constrain Proportions
    Resample Image
    With all three checked set the bottom dropdown to Bicubic and then hit OK.
    If you want to apply some sharpening select Enhance on the top menu and choose Unsharp Mask.
    Make sure the Radius is no more than 1.5 and use the amount slider to get the image looking as you want it then save.
      

  • Image-resize servlet

    Hi,
    I�ve been working on an image-resizing servlet on and off for quite some time now, and I just cant seem to get it to load the image correctly.
    I guess its very simple once you figure it out. The following is the interesting part:
    Image image = Toolkit.getDefaultToolkit().getImage("../pictures/pic" + pictureId + ".jpg");
    MediaTracker tracker = new MediaTracker( new JFrame() );
    tracker.addImage(image, 1);
    // Load image
    try {
      tracker.waitForAll();
    } catch (InterruptedException e) {}
    // Scale image
    image = image.getScaledInstance(width, height, Image.SCALE_DEFAULT);I then copy the Graphics from the Image to another Graphics before it is sent to the client (have some cache-stuff going on in the middle), but all images turn out beeing plain black.
    Anyone with ideas/sample code?

    hi flaperman
    i did something similar in my resizing servlet:
    BufferedImage image = ImageIO.read(new File(path));
    Image im = image.getScaledInstance(width, height, Image.SCALE_FAST);
    BufferedImage thumbnail = toBufferedImage(im);
    ImageIO.write(thumbnail, "jpeg", response.getOutputStream());
    i found the code of the method toBufferedImage() on the following page http://developers.sun.com/solaris/tech_topics/java/articles/awt.html
    maybe this will help you. but i'm afraid it is slow and it seems to be leaking memory (a lot).
    cheers

  • How to make image resizable using mouse ?

    Hi,
    I want to know about that how to resize image by using mouse in Java Canvas. I created some tools like line, free hand, eraser. And want to know how to make an image resizable in canvas by using mouse. An image is jpeg, png, or gif format. I want to make image stretch and shrink by using mouse.
    Please help me..
    Thnax in advance.
    Manveer

    You make a listener to handle the mouse event that you want to capture, then program the affect you want using the event as the trigger.

  • Photshop CS6 image resizing tool.

    Five time I have entered a support question but it does not seem to appear in the lists nor have I had a response, am I entering my request incorrectly?
    My request is:
    I have a PC using Windows 7. I have Photoshop CS6 which I have been using for some time. Very recently the image, image size tool has stopped working. I open the drop down window and the current size of my image is displayed. I then try and type the required changed size in the box but the box does not accept it. The size remains the same. I have un-installed and re-installed CS6 and put in all the latest updates. The first image I tried, it allowed me to change the size. The second image the resize tool would not allow any changes. We were back to where we started. Elsewhere on the support FAQs it was suggested such problems might be cured by deleting \adobe photo cs6 prefs.psp file. This I have done but still I cannot resize my images.
    Please can someone help me??

    If Photoshop has been working well for you then start acting strange the first thing that should come to you  mind is your Photoshop preferences.  Your Photoshop preferences are Photoshop setting made for your user ID for how you want Photoshop to behave.  Each user ID has there own set of Preference files. These are not installed or removed when you Install or uninstall Photoshop.   So if you un-install and re-install Photoshop your Photoshop preferences remain intact.  If the Problem you are having is caused by a corrupt Photoshop preference file.  You will still have that same problem. Did you try resetting your Photoshop preferences?
    Though the Image size dialog is simple many users do not really understand everything about image resizing.  Using a quick look at the image we see three section Top, Middle and bottom..
    Top section is basicly image file size how many pixels are there in the image.
    Middle Image Print Size.
    Bottom Image Resize Image Controls.
    To understand Image Resize you must start from the bottom.  In the bottom control section  Resample Image is the single control that governs  the whole resizing process.   When "Resample Image"  is NOT checked all other controls have no roll in the resize process they are grayed out as is the top file size section.  The file size will not change the pixel will not change. Note all that is grayed out in the above image.  All that can be change is the print size.  The middle section and all three sizes there are tied together as shown by the lines and link icon.  Change one size there and Photoshop will calculate the other two and display the proper values. All  thee setting in the center are sizes associated with length.  Width number uints, Height number uints. and Resolution number Pixel/unit. Resolution therefore is pixels size and pixels have an aspect ratio. Most image pixel these days are square 1:1 aspect ratio.  Photoshop support non square pixels but can only display image using square pixels display have. 
    So when Resample is not checked. The image has a  Width with a fixed number Pixel, a Height with a fixed number Pixels and Pixel aspect ratio. Setting any one print dimension will also set the other two dimensions.
    When resample is check the other controls in the bottom section become useable and so does the top file section.  Normally you should check Constraint Proportions link Width and Height so your image will not distort during the resize. When you resample an image you wind up with an entirely new image with a different number of pixels. Some image quality has been lost for you either through way some details you had or created some details you did not have.  The image quality will depend on the quality of the pixels you had and how well the interpolation method used worker with those pixels. IMO Adobe Bicubic Automatic is not a good general purpose method to it tend to add many artifacts to image that have been sharpened.
    In newer version of Photoshop CC and CC 2014 Adobe has redesigned the Image Size dialog adding a preview  image display. Made the dimension link icon the constrain proportion control when resample is checked. Also hid the scale style option under a gear icon in the upper right corner.

  • PSE5 Process Multiple Files Image Resize

    I want to batch convert some TIFF files to JPG and make them all 300 ppi. I tried suing the Multiple file processor in the Editor just entering 300 in resolution and leaving width & height blank. I hoped it would perform the same process as going to image resize and and changing resolution with resample and constrain proportions turned off. Instead it has changed the ppi from 72 to 300, but kept the size the same i.e. has added lots of extra pixels making the file enormous.
    The only way I can force it to shrink the image is to enter say 30cm as the width. The problem with this is twofold a) I have to trun all my photos so they are landscape b) if I have cropped a photo such that it doesn't have enough pixels to stretch then again it is getting resampled.
    Is this a limitation of PSE5 that wouldn't be there in CS3 or am I doing something wrong? I only want to print tham out 15x10 but read I should resize everything to 300 ppi. To be honest I never did this before I had PSE and they seemed to come out OK from a Canon that saves the files as default 72 ppi but large dimensions. Maybe someone couldexplain in laymans terms why the photos need to be resized to 300 ppi anyway? Thank you

    Well, you see, Process Multiple files is doing just what you asked it to do: it's
    resizing the photos. But you don't really want to resize the photos, just change the ppi setting. Is there a particular reason you want them to be 300ppi? PPI is a setting that only matters for printing or if you are sending a photo somewhere that requires that marker to be set to 300. Your camera doesn't know anything about ppi, only absolute pixel dimensions (eg 2480 x 1795 or whatever).
    When you go to print, however, your printer may prefer to have a higher pixel density, since it can play your pixels like an accordian: squash them closer together or spread them out thinner, depending on that ppi marker. The pixel density determines the inch/cm size of your print (at 72 ppi you'll get a print that's hugely bigger but less detailed; at 300 ppi a crisper smaller print.)
    I'm wondering why you would want to batch convert a whole big bunch of images at once, though. It would help if you would explain just what you want to do with the photos that requires the 300 ppi.

  • Image Resize Menu not available

    According to Mail Help, when I insert an image into an email, there is supposed to be an image resize menu in the lower right portion of the window and a message size indicator in the lower left of the window. Neither of these are appearing for me. I have tried attaching an image in a number of different ways with the "insert attachment at end of message" both on and off. Any ideas out there?

    I've got the same problem. It only occurred after upgrading to Leopard.
    Before it worked fine. (Leopard is for me not a success on this moment: my pages just stopped working, can't connect via bleutooth to my phone anymore using addressbook, eyeTV also stops at random and restarts are occurring often. I'm starting to get that 'trow this stupid thing out the window' feeling i had during my MS windows era.

  • Slideshow image resizing when adding new images

    I am creating a series of slideshows on multiple pages. I created one slide show using the "basic" slideshow and resized it to the dimensions and settings I wanted. I have many pictures all of different proportion, therefore, I selected the "fill frame proportionally" so they would all fit the dimension I set. I wanted to use this first slideshow as a template for all of the rest. I added images to this first slideshow with no problems. All of my different sized images scaled or cropped to fit within the dimension I set. The problem comes in when I do two things: 1) When I add other images of different dimensions to this same slideshow gallery, they come smaller that the intended dimensions I set previous. I check the setting and it is still on "fill frame proportionally" similar to the first batch of pictures. 2) The second issue is when copy this slideshow as a template to other pages. When I try to replace or add to the slideshow gallery, the images come in cropped or smaller rather than filling the frame. Again, the settings are still the same from my very first slideshow that worked just as i intended.
    I could resize all the images to all the same dimensions using another program like photoshop, but that is another step that is very tedious and it would seem that it should be something built into Muse.
    Is there a way around this?. Am I doing something wrong? Or is this just one of those glitches that happens with Muse? I appreciate any help that I can get.
    Thanks!

    Hi, I got it to work like this:
    Using background colours in Photoshop so that all sizes are the same in pixels. Then manually adjusting thumbnails by double-clicking on them so that a red square appears.
    Cheers,
    Elsemiek
    Op 26 dec. 2014, om 00:50 heeft MediaGraphics <[email protected]> het volgende geschreven:
    slideshow image resizing when adding new images
    created by MediaGraphics <https://forums.adobe.com/people/MediaGraphics> in Adobe Muse Bugs - View the full discussion <https://forums.adobe.com/message/7043933#7043933>
    Hi there Elsemiekagain,
    I had to fiddle around with my slide show to get it to work. That is, it worked at first, then went funky, and I had to fiddle. So much fiddling that I can't possibly know what actually made it start to work again.
    And to some degree, this is the way that I find Muse to be in general. That it requires finessing to get it to work as expected. This adds a good deal of time to every development project, though I am getting better at this with practice and experience.
    Most of it is not even things that could be easily put in words as instructions, as many are nanced. But in fairness, this version of Muse is a complete code re-write this year. So we do need to cut Adobe some slack, and give the team time to iron things out.
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7043933#7043933 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7043933#7043933
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Adobe Muse Bugs by email <mailto:[email protected]ftware.com> or at Adobe Community <https://forums.adobe.com/choose-container.jspa?contentType=1&containerType=14&container=47 59>
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624 <https://forums.adobe.com/thread/1516624>.

  • Image resize in CS5 vs cell size in LR3 for large print quality

    What is the benefit of image resizing(larger) with resampling in photoshop than creating a larger cell size and increasing the DPI in LR3 if the file is to be printed just out of LR3.  Is there a significant improvement in image quality if this is done in CS5, if so then what about the need for fractal program.  I am taking my images with a D3x and making prints up to 20x30 on Epson 7900?

    Interoperation from LR is far superior to the basic in PS CS 4, whilst this may have improved in CS 5 I haven't tried it and wouldn't expect it to be any better than LR 3. The print module in LR can also make it all a lot easier to do than using PS. Some may still prefer Genuine Fractals (I have a copy), however I have felt no need for it since LR 2. Any resizing I require is done using LR

Maybe you are looking for

  • When we synch data from AD to FIM Portal 2010 r2 the data is not updates in FIM Portal.

    Hi, When we synch data from AD to FIM Portal 2010 r2 the data is not updates in FIM Portal. Active directory attribute co have value vietnam but in FIM Portal country attribute have value VIET NAM we simply mapped AD Attribite to FIM Attribute for in

  • Personalized emails in Mail???

    Is there a relatively simple way of sending emails in a 'house' style ie with my logo? In its simplest form I would like to include a banner along the bottom of each email which will appear in as many other mail clients as possible. and the most comp

  • Burning cd's on mac

    I put in a maxell cd-R into my macbook pro because i wanted to burn pictures onto it, but it wont work, any solutions to this? please and thank you, greatly appreciated.

  • [SOLVED] Missing acpi hwmon sysfs interface on Eeepc 1000H

    Hi, I am running a fresh install using Linux 3.15.8-1-ARCH kernel on Asus Eeepc 1000H and there is a problem with the detected thermal sensors. After configuring sensors using sensors-detect (yes to all answers, full detection), I only get this: $ se

  • How do I set up my system so that I can program in C

    How do I set up my system so that I can program in C,C  ? Without using Xcode. Just want to write simple "hello, world" stuff. So far, my Mac seem oblivious to my efforts even though it seems that all the files are there. At first, it could not find