CN107911571B - Image transmission control method, device and storage medium and mobile terminal - Google Patents

Image transmission control method, device and storage medium and mobile terminal Download PDF

Info

Publication number
CN107911571B
CN107911571B CN201711240069.1A CN201711240069A CN107911571B CN 107911571 B CN107911571 B CN 107911571B CN 201711240069 A CN201711240069 A CN 201711240069A CN 107911571 B CN107911571 B CN 107911571B
Authority
CN
China
Prior art keywords
image
transmitted
target
thumbnail information
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711240069.1A
Other languages
Chinese (zh)
Other versions
CN107911571A (en
Inventor
王泽权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711240069.1A priority Critical patent/CN107911571B/en
Publication of CN107911571A publication Critical patent/CN107911571A/en
Application granted granted Critical
Publication of CN107911571B publication Critical patent/CN107911571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32267Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
    • H04N1/32277Compression
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present application discloses a kind of image transmission control method, device and storage medium and mobile terminal.The described method includes: determining whether there is the thumbnail information of image to be transmitted;The image to be transmitted is then compressed according to setting compress mode, generates target thumbnail information by the thumbnail information if it does not exist;The target thumbnail information is transmitted to computer equipment, the target thumbnail information is used to indicate the computer equipment and shows the image to be transmitted with breviary diagram form.Technical solution provided by the embodiments of the present application, realizing various types of images to be transmitted has corresponding thumbnail information, by the way that the thumbnail information of image to be transmitted is transmitted to computer equipment end, so that various types of images to be transmitted can the form of thumbnail shown on a computing device, substantially reduce user and filter the time for searching Target Photo in a large amount of pictures.

Description

Image transmission control method, device and storage medium and mobile terminal
Technical field
The invention relates to information transmission and control technical field more particularly to a kind of image transmission control methods, dress It sets and storage medium and mobile terminal.
Background technique
Function in the mobile terminals such as mobile phone is more and more, provides convenience for the life and work of people, at present mostly Number mobile phone all supports media transmission protocol (Media Transfer Protocol, MTP), passes through the protocol realization mobile phone and meter The communication for calculating machine equipment, the corresponding information of mobile phone is shown at computer equipment end.The relevant technologies, when image information passes in mobile phone It transports under the scene that computer equipment is shown, for the control method existing defects of image transmitting, needs to improve.
Summary of the invention
The embodiment of the present application provides a kind of image transmission control method, device and storage medium and mobile terminal, Ke Yihe The transmission mode of the control image of reason, all kinds of images in mobile terminal are shown on a computing device with breviary diagram form Show.
In a first aspect, the embodiment of the present application provides a kind of image transmission control method, comprising:
Determine whether there is the thumbnail information of image to be transmitted;
The thumbnail information if it does not exist then compresses the image to be transmitted according to setting compress mode, raw At target thumbnail information;
The target thumbnail information is transmitted to computer equipment, the target thumbnail information is used to indicate the meter It calculates machine equipment and the image to be transmitted is shown with breviary diagram form.
In second aspect, the embodiment of the present application provides a kind of image transmitting control device, comprising:
Thumbnail information judgment module is used to determine whether that there are the thumbnail informations of image to be transmitted;
Thumbnail information generation module, for the thumbnail information if it does not exist, then by the image to be transmitted according to Setting compress mode is compressed, and target thumbnail information is generated;
Thumbnail information transmission module, for the target thumbnail information to be transmitted to computer equipment, the target Thumbnail information is used to indicate the computer equipment and shows the image to be transmitted with breviary diagram form.
The third aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence realizes the image transmission control method as provided by first aspect when the program is executed by processor.
In fourth aspect, the embodiment of the present application provides a kind of mobile terminal, including memory, processor and is stored in On reservoir and the computer program that can run on a processor, the figure such as first aspect provided by is realized when the processor executes As transfer control method.
The embodiment of the present application after mobile terminal and computer equipment are by MTP protocol communication connection, mobile terminal to Before computer equipment transmits image information, by first judging image to be transmitted with the presence or absence of thumbnail information, in figure to be transmitted When as thumbnail information is not present, compression is carried out to image to be transmitted according to setting compress mode and generates thumbnail information, will be contracted Sketch map information is transmitted to computer equipment, and the thumbnail information is used to indicate the computer equipment and is shown with breviary diagram form The image to be transmitted, realizing various types of images to be transmitted has corresponding thumbnail information, by by figure to be transmitted The thumbnail information of picture is transmitted to computer equipment end so that various types of images to be transmitted can the form of thumbnail exist It is shown in computer equipment, substantially reduces user and filter the time for searching Target Photo in a large amount of pictures.
Detailed description of the invention
Fig. 1 is the MTP communication connection signal between a kind of mobile terminal provided by the embodiments of the present application and computer equipment Figure;
Fig. 2 is a kind of flow chart of image transmission control method provided by the embodiments of the present application;
Fig. 3 is the flow chart of another image transmission control method provided by the embodiments of the present application;
Fig. 4 is the coordinates regional schematic diagram of picture size set B1-B4 provided by the embodiments of the present application;
Fig. 5 is the original image schematic diagram of all types of images to be transmitted provided by the embodiments of the present application;
Fig. 6 is the display schematic diagram of all kinds of images on a computing device in the prior art;
Fig. 7 is display schematic diagram on a computing device provided by the embodiments of the present application;
Fig. 8 is the flow chart of another image transmission control method provided by the embodiments of the present application;
Fig. 9 is a kind of structural schematic diagram of image transmitting control device provided by the embodiments of the present application;
Figure 10 is a kind of structural schematic diagram of mobile terminal provided by the embodiments of the present application;
Figure 11 is the structural schematic diagram of another mobile terminal provided by the embodiments of the present application.
Specific embodiment
It is specifically real to the application with reference to the accompanying drawing in order to keep the purposes, technical schemes and advantages of the application clearer Example is applied to be described in further detail.It is understood that specific embodiment described herein is used only for explaining the application, Rather than the restriction to the application.It also should be noted that illustrating only for ease of description, in attached drawing related to the application Part rather than full content.It should be mentioned that some exemplary realities before exemplary embodiment is discussed in greater detail It applies example and is described as the processing or method described as flow chart.Although operations (or step) are described as sequence by flow chart Processing, but many of these operations can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of operations It can be rearranged.The processing can be terminated when its operations are completed, be not included in attached drawing it is also possible to have Additional step.The processing can correspond to method, function, regulation, subroutine, subprogram etc..
Technical solution provided by the embodiments of the present application is applicable to mobile terminal by media transmission protocol MTP, with calculating The application scenarios of machine equipment communication.MTP is one and transmits image, music etc. between computer equipment and portable mobile termianl Prepared agreement.The application of MTP is divided into two kinds of roles, and one is as Initiator, another is as Responder.With " Android phone " connection " personal computer (personal computer, PC) ", the end PC are Initiator, and mobile phone terminal is For Responder, their relationship is as shown in Figure 1, request all in MTP is all initiated by Initiator.For example, PC File data in request Android phone.Responder mobile phone can handle the request of Initiator;In addition to this, Responder can also send Event event.
Fig. 2 gives a kind of flow chart of image transmission control method provided by the embodiments of the present application, the side of the present embodiment Method can be executed by image transmitting control device, which can realize that described device can by way of hardware and/or software The inside of the mobile terminal is set as mobile terminal a part.Mobile terminal described in the embodiment of the present application include but It is not limited to the equipment such as mobile phone, tablet computer, notebook or USB flash disk, mobile hard disk.
As shown in Fig. 2, image transmission control method provided in this embodiment the following steps are included:
Step 101, the thumbnail information for judging whether there is image to be transmitted, then follow the steps 102 if it does not exist, if depositing Thening follow the steps 104.
The frame of MTP in Android is given below in the technical solution of the application for ease of understanding:
At Kernel layers, USB, which drives, is responsible for data exchange, and MTP driving is responsible for and upper layer is communicated, at the same also and USB driving is communicated.USB, which drives, is responsible for data exchange, after referring to that Android device is connected with PC by USB data line, Actual data exchange is to be sent to USB by USB data line to drive.For " MTP request ", MTP driving can be from USB The MTP request data parsed in driving, is then passed to upper layer.And for " MTP feedback " that upper layer is transmitted, MTP driving Can by feedback content it is packed after, by pass to USB driving.
At JNI layers, MtpServer can constantly monitor the message " MTP request " of Kernel, and carry out to corresponding message Relevant treatment.Meanwhile the Event event of MTP is also to be sent to what MTP drove by MtpServer.MtpStorage corresponding one A " storage unit ";For example, SD card just corresponds to a MtpStorage.MtpPacket and MtpEventPacket is responsible for MTP Message is packaged.Android_mtp_MtpServer is a JNI class, it is " MtpServer and Java layers of JNI layers The bridge that MtpServer " is linked up.Android_mtp_MtpDatabase is also a JNI class, and JNI layers are realized pair by it The operation of MtpDatabase (Framework layers).
At Framework layers, MtpServer is equivalent to a server, it with bottom by communicate providing The related service of MTP.MtpDatabase acts as the function of database, but there is no databases to data progress for itself It saves, is substantially data required for being obtained by MediaProvider database." storage that MtpStorage is one corresponding Unit ", it and " JNI layers of MtpStorage " are corresponding.
At Application layers, MtpReceiver is responsible for receiving broadcast, will start/closes after receiving broadcast MtpService;For example, will start when MtpReceiver receives the message of " Android device and PC are connected " MtpService.The effect of MtpService is to provide the service of management MTP, it will start MtpServer, and will locally deposit Store up the content synchronization of content and MTP.Role of the MediaProvider in MTP is locally stored content lookup and local content It is synchronous;For example, it is synchronous to carry out MTP data that MediaProvider is notified that MtpServer when a local newly-increased file.
Optionally, which may include: to determine mobile terminal in the MTP request for receiving computer equipment transmission On image to be transmitted (picture) whether there is thumbnail information.Wherein, the MTP request can be for for obtaining mobile terminal On image to be transmitted request.
In general, the image of some types itself carries thumbnail information, and the image of some types itself is not taken Band thumbnail information.For example, Joint Photographic Experts Group (Joint Photographic Experts GROUP, JPEG) type Image generally carry the thumbnail information of exif format, and digitlization news collection (Digital News Gathering, DNG) type and label image file format (Tag Image File Format, TIFF) type image It can carry thumbnail information, and portable network graphic (Portable Network Graphics, PNG) type, bitmap (Bitmap, BMP) type, graphic interchange format (Graphics Interchange Format, GIF) type, Scalable Vector Figure (Scalable Vector Graphics, SVG) type or Raw Image Format (RAW Image Format, RAW) image of type do not carry thumbnail information.For there is the image of thumbnail information, mobile terminal passes through JNI method, MyMtpDatabase::getObjectInfo, MyMtpDatabase::getThumbnail are transferred information to Behind the end PC, the thumbnail of image can be shown on the end PC, and for the image without thumbnail information, it is not shown then on the end PC Show thumbnail.
It optionally, before this step can be the following steps are included: obtaining the image type of image to be transmitted;Accordingly , it is determined whether if may include: described image type there are the thumbnail information of image to be transmitted is the first setting type, Judge whether the image to be transmitted includes thumbnail information;If not including, it is determined that there is no the thumbnails of image to be transmitted Information;If comprising judging whether included thumbnail information is legal;If legal, it is determined that there are the contractings of image to be transmitted Sketch map information;If it is illegal, it is determined that there is no the thumbnail informations of image to be transmitted;If described image type is the second setting Type, it is determined that there is no the thumbnail informations of the image to be transmitted;Wherein, the first setting type includes joint image Panel of expert's JPEG type, digitlization news collection DNG type and label image file format TIFF type, second setting Type includes portable network graphic PNG type, bitmap BMP type, graphic interchange format GIF type, scalable vector graphics SVG type or Raw Image Format RAW type.
In the image to be transmitted there are when thumbnail information, directly the thumbnail information of image to be transmitted can be transmitted To computer equipment, or the legitimacy of the verifying thumbnail information, thumbnail information is passed if thumbnail information is legal Computer equipment is transported to, then determining image to be transmitted if it is illegal, there is no thumbnail informations, execute step 102.Wherein, breviary The verifying of figure information legitimacy can be verified according to preset rules, such as the integrality of verifying thumbnail information.
Step 102 compresses the image to be transmitted according to setting compress mode, generates target thumbnail information.
If thumbnail information is not present in image to be transmitted, the image to be transmitted is pressed according to setting compress mode Contracting generates target thumbnail information.Optionally, it can use the image Compression provided in the skia of function handling graph library to connect Image to be transmitted is compressed according to setting compress mode, generates target thumbnail letter by mouth getSampledDimensions Breath.
Optionally, which includes: to obtain the image information of the image to be transmitted, and described image information includes image ruler It is very little;Rule is determined according to setting compression multiplying power, and the compression multiplying power of the image to be transmitted is determined based on described image information;According to The compression multiplying power draws target painting canvas, generates target thumbnail information.Described image size includes the width and length of image.
Optionally, described to draw target painting canvas according to the compression multiplying power, generating target thumbnail information includes: that creation is first Beginning painting canvas;According to the compression multiplying power, target width and object height are determined, and the initial painting canvas is adjusted to width as institute It states target width and height is the target painting canvas of the object height;The image reduced overall to be transmitted is plotted to described Target painting canvas generates target thumbnail information.
Illustratively, the part realization code for generating target thumbnail information is provided:
#ifdef VENDOR_EDIT
//Zequan.Wang@EXP.AD.Usb.Mtp.941877,2017/05/12,Add for surpport picture Thumbnail display
case MTP_FORMAT_BMP:
case MTP_FORMAT_PNG:
{
//ALOGD("MtpDatabase::getThumbnail FORMAT_BMP/PNG\n");
If (imageDecode (path.string (), false)) // get thumbnail
// encoding and decoding are carried out to current thumbnail figure, skdata is exactly painting canvas, and painting canvas content is exactly to draw thumbnail DecodingBitmap information
SkAutoTUnref skdata(SkImageEncoder::EncodeData(decodingBitmap,
SkImageEncoder::kJPEG_Type,SkImageEncoder::kDefaultQuality));
if(skdata.get()){
Result=malloc (skdata- > size ());
if(result){
//ALOGD (" MtpDatabase::getThumbnail FORMAT_BMP/PNG size:%zu n ", skdata->size());
// thumbnail is put into content result, this result can be given to the end PC by getThumbnail ()
memcpy(result,skdata->data(),skdata->size());
OutThumbSize=skdata- > size ();
}
}
}else{
ALOGD("MtpDatabase::getThumbnail FORMAT_BMP/PNG-FAIL\n");
}
break;
}
#endif/*VENDOR_EDIT*/
The target thumbnail information is transmitted to computer equipment by step 103, and the target thumbnail information is for referring to Show that the computer equipment shows the image to be transmitted with breviary diagram form.
Optionally, which be may include: and is passed through the target thumbnail information based on media transmission protocol MTP GetThumbmail function is transmitted to computer equipment with object approach.
It optionally, can also be by image to be transmitted while the target thumbnail information is transmitted to computer equipment Original image be transmitted to computer equipment and be cached in computer equipment.
The thumbnail information of the image to be transmitted is transmitted to computer equipment by step 104.The target thumbnail letter Breath is used to indicate the computer equipment and shows the image to be transmitted with breviary diagram form.
If there are thumbnail informations for the image to be transmitted, directly the thumbnail information of image to be transmitted can be transmitted to Computer equipment, on a computing device to show image to be transmitted with breviary diagram form.
Image transmission control method provided in this embodiment moves after mobile terminal and computer equipment communication connection Before dynamic terminal transmits image information to computer equipment, by first judging that image to be transmitted whether there is thumbnail information, When thumbnail information is not present in image to be transmitted, compression is carried out to image to be transmitted according to setting compress mode and generates thumbnail letter Breath, is transmitted to computer equipment for thumbnail information, the thumbnail information is used to indicate the computer equipment with thumbnail Form shows the image to be transmitted, and realizing various types of images to be transmitted has corresponding thumbnail information, pass through by The thumbnail information of image to be transmitted is transmitted to computer equipment end, so that various types of images to be transmitted can thumbnail Form shown on a computing device, substantially reduce user filtered in a large amount of pictures search Target Photo when Between, the user experience is improved.
Fig. 3 gives the flow chart of another image transmission control method provided by the embodiments of the present application.As shown in figure 3, Method provided in this embodiment the following steps are included:
Step 201, the thumbnail information for judging whether there is image to be transmitted, then follow the steps 202 if it does not exist, if depositing Thening follow the steps 208.
Step 202, the image information for obtaining the image to be transmitted, described image information includes picture size.
Step 203 determines rule according to setting compression multiplying power, determines the image to be transmitted based on described image information Compress multiplying power.
Wherein, start to execute the compression coding and decoding operation to image to be transmitted in the step, the coding-decoding operation includes Step 203 to step 206, coding-decoding operation can be realized by imageDecode function.The determination of the step compresses multiplying power can To be realized by getSamePleSize (int w, int h) function, w is the width of image to be transmitted, and h is image to be transmitted Height.
Optionally, which includes: default pair for obtaining pre-generated picture size set and compression of images multiplying power Answer relation table;Based on the picture size of the image to be transmitted, the corresponding affiliated target image ruler of the image to be transmitted is determined Very little set;It is based on the default mapping table according to the target image size set, determines that the image to be transmitted is corresponding Compression multiplying power sampleSize.
Correspondingly, can also include the steps that generating the default mapping table, the i.e. controlling party of embodiment offer Method can be the following steps are included: obtain preset image sizes referring to set A1, preset image sizes referring to set A2, default figure As size reference set A3, preset image sizes reference set A4, preset image sizes reference set A5, wherein the A1 includes Set { (w, h) | int w≤100dp or int h≤100dp }, the A2 include set (w, h) | int w≤200dp or Int h≤200dp };The A3 includes set { (w, h) | int w≤400dp or int h≤400dp };The A4 includes Set (w, h) | int w≤800dp or int h≤800dp };The A5 include set (w, h) | int w≤1600dp Or int h≤1600dp, the w is the width of image, and the h is the height of image;Calculate picture size set B1, image Size set B2, picture size set B3, picture size set B4, wherein B1 is the difference of the A2 and the A1, and B2 is institute The difference of A3 and the A2 are stated, B3 is the difference of the A4 and the A3, and B4 is the difference of the A5 and the A4;Determine image Size set B1, picture size set B2, picture size set B3, the corresponding compression multiplying power of picture size set B4 are respectively 1 Again, 2 times, 4 times and 8 times;Generate picture size set B1, picture size set B2, picture size set B3, picture size set B4 and the respectively default mapping table of compression multiplying power.
It should be noted that only with preset image sizes referring to set A1-A5 and obtained image ruler in the present embodiment It is illustrated for very little set B1-B4, this is because it is actually very big for the image for belonging to set A5 or B4, The image of most of size is almost covered, in addition exhaustive all set difficulty are larger, but those skilled in the art can manage Solution can also include set A0 { (w, h) | int w≤50dp or int h≤50dp }, A6 (w, h) | int w≤ 3200dp or int h≤3200dp }, A7 (w, h) | int w≤6400dp or int h≤6400dp } etc., and can be corresponding B0, B5, B6 etc. are calculated, the present embodiment is to this and is not limited.
In addition, the present embodiment is the reason of different compression multiplying powers are arranged for the size of image to be transmitted: general to calculate The thumbnail of machine equipment end default is shown in 50*50dp-100*100dp, it is ensured that the compressed figure to be transmitted of suitable multiplying power As can shown in it is clear, can be on the other hand by carrying out the compression of reasonable multiplying power based on picture size to image to be transmitted The Caton in mobile terminal and computer equipment end transmission process is avoided, and saves the resource occupied in transmission process.
Wherein, dp is virtual pixel, the meeting automatic adaptation in the equipment of different pixel densities, such as: at 320x480 points Resolution, pixel density 160,1dp=1px is in 480x800 resolution ratio, pixel density 240,1dp=1.5px.Calculation formula: 1dp* pixel density/160=actual pixels number.The power times that compression multiple in the embodiment of the present application is 2, this is by image What storage mode was influenced.
Wherein, set A2-A1 is exactly that element in set A2 subtracts the element set after the intersection A1A2 of A2 and A1.According to Above content indicates 100dp < w≤200dp or 100dp < h≤200dp image, set B2 table it is found that for set B1 Show 200dp < w≤400dp or 200dp < h≤400dp image, set B3 indicate 400dp < w≤800dp or 400dp < h < The image of=800dp, set B4 indicate 800dp < w≤1600dp or 800dp < h≤1600dp image.For ease of understanding, As shown in figure 4, giving the picture size that set B1-B4 is included, wherein abscissa is picture traverse w, and ordinate is image Height h, unit are all dp.
Wherein, for the picture size based on the image to be transmitted, the corresponding affiliated mesh of the image to be transmitted is determined Logo image size set is highly illustratively 180, then image X to be transmitted if the width w of image X to be transmitted is 150 (150,180) corresponding affiliated target image size set is exactly B1, is highly 300 if the width of image Y to be transmitted is 300, Target image size set belonging to image Y (300,300) so to be transmitted is corresponding is exactly B2.
Optionally, described that the default mapping table is based on according to the target image size set, determine it is described to If transmitting the corresponding compression multiplying power of image includes: that the target image size collection is combined into B1, it is based on the default corresponding relationship Table determines that the corresponding compression multiplying power of the image to be transmitted is 1 times;If the target image size collection is combined into B2, based on described Default mapping table determines that the corresponding compression multiplying power of the image to be transmitted is 2 times;If the target image size collection is combined into B3 then determines that the corresponding compression multiplying power of the image to be transmitted is 4 times based on the default mapping table;If the target figure As set of dimensions is combined into B4, then determine that the corresponding compression multiplying power of the image to be transmitted is 8 times based on the default mapping table.
As above-mentioned example then can be from default pair after being determined that the target image size collection of image X to be transmitted is combined into B1 Answering and finding the corresponding compression multiplying power of image X to be transmitted in relation table is 1 times;The target image of image Y to be transmitted is being determined Set of dimensions is combined into after B2, then it is 2 times that the corresponding compression multiplying power of image Y to be transmitted can be found from default mapping table.
Step 204, the initial painting canvas of creation.
An initial painting canvas decodingBitmap is created first.It should be noted that the step 204 can also be in step It is executed before 203, the present embodiment is to this and is not limited.
Step 205, according to the compression multiplying power, determine target width and object height, and the initial painting canvas is adjusted For width be the target width and height is the target painting canvas of the object height.
The image reduced overall to be transmitted is plotted to the target painting canvas by step 206, generates target thumbnail letter Breath.
The image to be transmitted is based on compression multiplying power progress reduced overall to be plotted in target painting canvas, and generates target contracting Sketch map information.
If thumbnail is drawn successfully, the target painting canvas and thumbnail information that draw are assigned to The result parameter result of getSampledDimensions function.
The present embodiment can be made in thumbnail information by carrying out reduced overall to image to be transmitted comprising figure to be transmitted The complete image information of picture, compared with the prior art in Sampling Compression is carried out to image local, avoid cause it is some irregular Image shows infull problem at computer equipment end.
The target thumbnail information is transmitted to computer equipment by step 207, and the target thumbnail information is for referring to Show that the computer equipment shows the image to be transmitted with breviary diagram form.
Image is carried out to generate thumbnail information after reasonable multiplying power sampleSize compression, passes through the JNI of MTP GetObjectInfo, getThumbnail function transfer give the end PC.
The thumbnail information of the image to be transmitted is transmitted to computer equipment by step 208.
If there are thumbnail informations for the image to be transmitted, directly the thumbnail information of image to be transmitted can be transmitted to Computer equipment.
Method provided in this embodiment, if thumbnail information is not present in image to be transmitted, then according to image to be transmitted Picture size determines suitable compression multiplying power according to the determining rule of setting compression multiplying power, and according to the compression multiplying power to the first of creation The size of beginning painting canvas, which is adjusted, generates target painting canvas, and image to be transmitted is based on the compression multiplying power reduced overall and is plotted to target On painting canvas, target thumbnail information is generated, target thumbnail information is transmitted in computer equipment, is realized to figure to be transmitted As the compression of reasonable multiplying power, so that can show clearly thumbnail on a computing device, transmission process is also effectively prevented In Caton problem, the image to be transmitted for realizing various types and size can be on a computing device with the shape of thumbnail Formula is shown.
In order to better illustrate and understand the technical solution of the application, the application experimentation is set forth in Fig. 5-Fig. 7 In sample data.
Fig. 5 gives the original image schematic diagram of the image to be transmitted of various types and size, as shown in figure 5, figure a is 100dp* 100dp, type is JPEG and has the image of legal exif thumbnail information, and figure b is 300dp*150dp, and type is the figure of PNG Picture, figure c are 100dp*100dp, and type is the image that JPEG and exif thumbnail information is lost, and figure d is 400dp*600dp, class Type is the image of BMP.
Fig. 6, which gives, not to be compressed using technical solution provided by the present application, by MTP by image transmitting to calculating After machine equipment, display effect on a computing device.As shown in fig. 6, being counted because figure a is the image with exif Calculate machine equipment on shown with breviary diagram form because figure b be without thumbnail information PNG type image, It is not shown on a computing device with breviary diagram form, although figure c is JPEG type due to being lost thumbnail letter Breath, so not shown on a computing device with breviary diagram form, because figure d is the BMP without thumbnail information The image of type, so not shown on a computing device with breviary diagram form.
After Fig. 7 gives the compression for carrying out suitable multiplying power to image using the technical solution of the application, transmitted by MTP To computer equipment, display effect on a computing device.As shown in fig. 7, because figure a has exif information without pressure Contracting, and can be shown with breviary diagram form;Scheme collection corresponding to the dimension of picture of b and be combined into B2, therefore passes through present techniques The compression that scheme has carried out 2 times becomes 150dp*75dp, and is shown with breviary diagram form;Because figure c is lost exif letter It ceases and the corresponding collection of dimension of picture is combined into B1, so having carried out 1 times of compression by technical scheme, and with breviary diagram form It is shown;Because the corresponding collection of the picture size for scheming d is combined into B3,4 times of compressions have been carried out by technical scheme Become 100dp*150dp, and is shown with breviary diagram form.
Fig. 8 gives the flow chart of another image transmission control method provided by the embodiments of the present application.As shown in figure 8, Image transmission control method provided in this embodiment the following steps are included:
Step 301, the MTP request for receiving computer equipment.Wherein, the MTP request is to move to acquisition for mobile terminal The request of the image data shown in dynamic terminal to be transmitted to computer equipment.
Step 302 judges that image to be transmitted with the presence or absence of thumbnail information, thens follow the steps 311, if it does not exist if it exists Then follow the steps 303.
Step 303, the picture size for obtaining the image to be transmitted.
Step 304, the default mapping table for obtaining pre-generated picture size set and compression of images multiplying power.
Step 305, the picture size based on the image to be transmitted determine the corresponding affiliated target of the image to be transmitted Picture size set.
Step 306 is based on the default mapping table according to the target image size set, determines described to be transmitted The corresponding compression multiplying power of image.
Step 307, the initial painting canvas of creation.
Step 308, according to the compression multiplying power, determine target width and object height, and the initial painting canvas is adjusted For width be the target width and height is the target painting canvas of the object height.
The image reduced overall to be transmitted is plotted to the target painting canvas by step 309, generates target thumbnail letter Breath.
The target thumbnail information is transmitted to computer equipment by step 310, and the target thumbnail information is for referring to Show that the computer equipment shows the image to be transmitted with breviary diagram form.
The thumbnail information of the image to be transmitted is transmitted to computer equipment by step 311.
Method provided in this embodiment judges whether image to be transmitted is deposited in the MTP request for receiving computer equipment In thumbnail information, if thumbnail information is not present in image to be transmitted, then being based on according to the picture size of image to be transmitted pre- The default mapping table of the picture size set and compression of images multiplying power that first generate determines suitable compression multiplying power, and according to this Compression multiplying power is adjusted the size of the initial painting canvas of creation and generates target painting canvas, and image to be transmitted is based on the compression multiplying power Reduced overall is plotted on target painting canvas, generates target thumbnail information, target thumbnail information is transmitted to computer equipment In, the compression to the reasonable multiplying power of image to be transmitted is realized, so that clearly thumbnail can be shown on a computing device, The Caton problem in transmission process is effectively prevented, the image to be transmitted for realizing various types and size can be in computer It is shown in the form of thumbnail in equipment.
Fig. 9 is a kind of structural schematic diagram of image transmitting control device provided by the embodiments of the present application, which can be by soft Part and/or hardware realization integrate in the terminal.As shown in figure 9, the device includes thumbnail information judgment module 41, contracting Sketch map information generating module 42 and thumbnail information transmission module 43.
The thumbnail information judgment module 41 is used to determine whether that there are the thumbnail informations of image to be transmitted;
The thumbnail information generation module 42, for the thumbnail information if it does not exist, then by the figure to be transmitted As being compressed according to setting compress mode, target thumbnail information is generated;
The thumbnail information transmission module 43, for the target thumbnail information to be transmitted to computer equipment, institute It states target thumbnail information and is used to indicate the computer equipment and the image to be transmitted is shown with breviary diagram form.
Device provided in this embodiment, after mobile terminal and computer equipment communication connection, mobile terminal is to calculating Before machine equipment transmits image information, by first judge image to be transmitted with the presence or absence of thumbnail information, image to be transmitted not There are when thumbnail information, compression is carried out to image to be transmitted according to setting compress mode and generates thumbnail information, by thumbnail Information is transmitted to computer equipment, and the thumbnail information is used to indicate described in the computer equipment shows with breviary diagram form Image to be transmitted, realizing various types of images to be transmitted has corresponding thumbnail information, by by image to be transmitted Thumbnail information is transmitted to computer equipment end so that various types of images to be transmitted can the form of thumbnail calculating It is shown on machine equipment, substantially reduces user and filter the time for searching Target Photo in a large amount of pictures.
Optionally, the thumbnail information generation module presses the image to be transmitted according to setting compress mode Contracting, generating target thumbnail information includes:
The image information of the image to be transmitted is obtained, described image information includes picture size;
Rule is determined according to setting compression multiplying power, and the compression times of the image to be transmitted is determined based on described image information Rate;
Target painting canvas is drawn according to the compression multiplying power, generates target thumbnail information.
Optionally, the thumbnail information generation module determines rule according to setting compression multiplying power, is believed based on described image Breath determines that the compression multiplying power of the image to be transmitted includes:
Obtain the default mapping table of pre-generated picture size set and compression of images multiplying power;
Based on the picture size of the image to be transmitted, the corresponding affiliated target image size of the image to be transmitted is determined Set;
It is based on the default mapping table according to the target image size set, determines that the image to be transmitted is corresponding Compression multiplying power.
Optionally, described device further include:
Preset image sizes obtain module referring to set, for obtaining preset image sizes referring to set A1, pre-set image Size is referring to set A2, preset image sizes referring to set A3, preset image sizes referring to set A4, preset image sizes reference Set A5, wherein the A1 includes set { (w, h) | int w≤100dp or int h≤100dp }, the A2 includes set (w, h) | int w≤200dp or int h≤200dp };The A3 include set (w, h) | int w≤400dp or int H≤400dp };The A4 includes set { (w, h) | int w≤800dp or int h≤800dp };The A5 includes set (w, h) | and int w≤1600dp or int h≤1600dp }, the w is the width of image, and the h is the height of image;
Picture size set obtains module, for calculating picture size set B1, picture size set B2, picture size collection B3, picture size set B4 are closed, wherein B1 is the difference of the A2 and the A1, and B2 is the difference of the A3 and the A2, B3 For the difference of the A4 and the A3, B4 is the difference of the A5 and the A4;
Multiplying power determining module is compressed, for determining picture size set B1, picture size set B2, picture size set The corresponding compression multiplying power of B3, picture size set B4 is respectively 1 times, 2 times, 4 times and 8 times;
Default mapping table generation module, for generating picture size set B1, picture size set B2, picture size Set B3, picture size set B4 and the respectively default mapping table of compression multiplying power.
Optionally, the thumbnail information generation module is based on the default correspondence according to the target image size set Relation table determines that the corresponding compression multiplying power of the image to be transmitted includes:
If the target image size collection is combined into B1, the image to be transmitted is determined based on the default mapping table Corresponding compression multiplying power is 1 times;
If the target image size collection is combined into B2, the image to be transmitted is determined based on the default mapping table Corresponding compression multiplying power is 2 times;
If the target image size collection is combined into B3, the image to be transmitted is determined based on the default mapping table Corresponding compression multiplying power is 4 times;
If the target image size collection is combined into B4, the image to be transmitted is determined based on the default mapping table Corresponding compression multiplying power is 8 times.
Optionally, the thumbnail information generation module draws target painting canvas according to the compression multiplying power, generates target contracting Sketch map information includes:
Create initial painting canvas;
According to the compression multiplying power, target width and object height are determined, and the initial painting canvas is adjusted to width and is The target width and height are the target painting canvas of the object height;
The image reduced overall to be transmitted is plotted to the target painting canvas, generates target thumbnail information.
Optionally, locking device further include:
Image type obtains module, for obtaining the image type of image to be transmitted;
The thumbnail information judgment module is specifically used for:
If described image type is the first setting type, judge whether the image to be transmitted includes thumbnail information; If not including, it is determined that there is no the thumbnail informations of image to be transmitted;If comprising judging that included thumbnail information is It is no legal;If legal, it is determined that there are the thumbnail informations of image to be transmitted;If it is illegal, it is determined that figure to be transmitted is not present The thumbnail information of picture;
If described image type is the second setting type, it is determined that there is no the thumbnail informations of the image to be transmitted;
Wherein, the first setting type includes Joint Photographic Experts Group JPEG type, digitlization news collection DNG class Type and label image file format TIFF type, the second setting type includes portable network graphic PNG type, bitmap BMP type, graphic interchange format GIF type, scalable vector graphics SVG type or Raw Image Format RAW Type.
Optionally, the thumbnail information transmission module is used for:
Based on media transmission protocol MTP, by the target thumbnail information by getThumbmail function with object side Formula is transmitted to computer equipment.
The embodiment of the present application also provides a kind of storage medium comprising computer executable instructions, and the computer is executable Instruction is used to execute a kind of image transmission control method when being executed by computer processor, this method comprises:
Determine whether there is the thumbnail information of image to be transmitted;
The thumbnail information if it does not exist then compresses the image to be transmitted according to setting compress mode, raw At target thumbnail information;
The target thumbnail information is transmitted to computer equipment, the target thumbnail information is used to indicate the meter It calculates machine equipment and the image to be transmitted is shown with breviary diagram form.
Storage medium --- any various types of memory devices or storage equipment.Term " storage medium " is intended to wrap It includes: install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Lan Basi (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium (such as hard disk or optical storage);Register or the memory component of other similar types etc..Storage medium can further include other Memory of type or combinations thereof.In addition, storage medium can be located at program in the first computer system being wherein performed, Or can be located in different second computer systems, second computer system is connected to the by network (such as internet) One computer system.Second computer system can provide program instruction to the first computer for executing." storage is situated between term Matter " may include may reside in different location (such as by network connection different computer systems in) two or More storage mediums.Storage medium can store the program instruction that can be performed by one or more processors and (such as implement For computer program).
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present application The image transmitting that executable instruction is not limited to the described above controls operation, can also be performed provided by the application any embodiment Relevant operation in image transmission control method.
The embodiment of the present application provides a kind of mobile terminal, and figure provided by the embodiments of the present application can be integrated in the mobile terminal As transmission control unit.Figure 10 is a kind of structural schematic diagram of mobile terminal provided by the embodiments of the present application.Mobile terminal 500 can To include: memory 501, processor 502 and it is stored in the computer program that can be run on memory 501 and in processor 502, The processor 502 realizes the image transmission control method as described in the embodiment of the present application when executing the computer program.
Mobile terminal provided by the embodiments of the present application, realizing various types of images to be transmitted has corresponding thumbnail Information, by the way that the thumbnail information of image to be transmitted is transmitted to computer equipment end, so that various types of images to be transmitted Can the form of thumbnail shown on a computing device, substantially reduce user and filtered in a large amount of pictures and search mesh It marks on a map time of piece.
Figure 11 is the structural schematic diagram of another mobile terminal provided by the embodiments of the present application, as shown in figure 11, the movement Terminal may include: memory 601, central processing unit (Central Processing Unit, CPU) 602 (also known as processor, Hereinafter referred to as CPU), the memory 601, for storing executable program code;The processor 602 described in reading by depositing The executable program code stored in reservoir 601 runs program corresponding with the executable program code, for executing: Determine whether there is the thumbnail information of image to be transmitted;The thumbnail information if it does not exist, then by the image to be transmitted It is compressed according to setting compress mode, generates target thumbnail information;The target thumbnail information is transmitted to computer Equipment, the target thumbnail information are used to indicate the computer equipment and show the image to be transmitted with breviary diagram form.
The mobile terminal further include: Peripheral Interface 603, RF (Radio Frequency, radio frequency) circuit 605, audio-frequency electric Road 606, loudspeaker 611, power management chip 608, input/output (I/O) subsystem 609, touch screen 612, other input/controls Control equipment 610 and outside port 604, these components are communicated by one or more communication bus or signal wire 607.
It should be understood that illustrating the example that mobile terminal 600 is only mobile terminal, and mobile terminal 600 It can have than shown in the drawings more or less component, can combine two or more components, or can be with It is configured with different components.Various parts shown in the drawings can include one or more signal processings and/or dedicated It is realized in the combination of hardware, software or hardware and software including integrated circuit.
Just the mobile terminal provided in this embodiment for image transmitting control is described in detail below, and the movement is whole End takes the mobile phone as an example.
Memory 601, the memory 601 can be accessed by CPU602, Peripheral Interface 603 etc., and the memory 601 can It can also include nonvolatile memory to include high-speed random access memory, such as one or more disk memory, Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU502 and deposited by Peripheral Interface 603, the Peripheral Interface 603 Reservoir 601.
I/O subsystem 609, the I/O subsystem 609 can be by the input/output peripherals in equipment, such as touch screen 612 With other input/control devicess 610, it is connected to Peripheral Interface 603.I/O subsystem 609 may include 6091 He of display controller For controlling one or more input controllers 6092 of other input/control devicess 610.Wherein, one or more input controls Device 6092 processed receives electric signal from other input/control devicess 610 or sends electric signal to other input/control devicess 610, Other input/control devicess 610 may include physical button (push button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole clicks idler wheel.It is worth noting that input controller 6092 can with it is following any one connect: keyboard, infrared port, The indicating equipment of USB interface and such as mouse.
Touch screen 612, the touch screen 612 are the input interface and output interface between user terminal and user, can It is shown to user depending on output, visual output may include figure, text, icon, video etc..
Display controller 6091 in I/O subsystem 609 receives electric signal from touch screen 612 or sends out to touch screen 612 Electric signals.Touch screen 612 detects the contact on touch screen, and the contact that display controller 6091 will test is converted to and is shown The interaction of user interface object on touch screen 612, i.e. realization human-computer interaction, the user interface being shown on touch screen 612 Object can be the icon of running game, the icon for being networked to corresponding network etc..It is worth noting that equipment can also include light Mouse, light mouse are the extensions for the touch sensitive surface for not showing the touch sensitive surface visually exported, or formed by touch screen.
RF circuit 605 is mainly used for establishing the communication of mobile phone Yu wireless network (i.e. network side), realizes mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuit 605 receives and sends RF letter Number, RF signal is also referred to as electromagnetic signal, and RF circuit 605 converts electrical signals to electromagnetic signal or electromagnetic signal is converted to telecommunications Number, and communicated by the electromagnetic signal with communication network and other equipment.RF circuit 605 may include for executing The known circuit of these functions comprising but it is not limited to antenna system, RF transceiver, one or more amplifiers, tuner, one A or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user identifier mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 606 is mainly used for receiving audio data from Peripheral Interface 603, which is converted to telecommunications Number, and the electric signal is sent to loudspeaker 611.
Loudspeaker 611 is reduced to sound for mobile phone to be passed through RF circuit 605 from the received voice signal of wireless network And the sound is played to user.
Power management chip 608, the hardware for being connected by CPU602, I/O subsystem and Peripheral Interface 603 are supplied Electricity and power management.
It is any that the application can be performed in image transmitting control device, storage medium and the mobile terminal provided in above-described embodiment Image transmission control method provided by embodiment has and executes the corresponding functional module of this method and beneficial effect.Not upper The technical detail of detailed description in embodiment is stated, reference can be made to image transmission control method provided by the application any embodiment.
The technical principle that above are only the preferred embodiment of the application and used.The application is not limited to spy described here Determine embodiment, various significant changes, readjustment and the substitution being able to carry out for a person skilled in the art are not departing from The protection scope of the application.Therefore, although being described in further detail by above embodiments to the application, this Shen Above embodiments please be not limited only to, can also include other more equivalence enforcements in the case where not departing from the application design Example, and scope of the present application is determined by the scope of the claims.

Claims (10)

1. a kind of image transmission control method characterized by comprising
Determine whether there is the thumbnail information of image to be transmitted, wherein the thumbnail information is that image to be transmitted is taken itself The attribute information of band;
The image to be transmitted is then compressed according to setting compress mode, generates mesh by the thumbnail information if it does not exist Mark thumbnail information;
The target thumbnail information is transmitted to computer equipment, the target thumbnail information is used to indicate the computer Equipment shows the image to be transmitted with breviary diagram form;
Obtain the image type of image to be transmitted;
The thumbnail information for determining whether there is image to be transmitted includes:
If described image type is the first setting type, judge whether the image to be transmitted includes thumbnail information;If no Include, it is determined that there is no the thumbnail informations of image to be transmitted;If comprising judging whether included thumbnail information closes Method;If legal, it is determined that there are the thumbnail informations of image to be transmitted;If it is illegal, it is determined that there is no images to be transmitted Thumbnail information;
If described image type is the second setting type, it is determined that there is no the thumbnail informations of the image to be transmitted;
Wherein, it is described first setting type include Joint Photographic Experts Group JPEG type, digitlization news collection DNG type and Label image file format TIFF type, the second setting type includes portable network graphic PNG type, bitmap BMP class Type, graphic interchange format GIF type, scalable vector graphics SVG type or Raw Image Format RAW type.
2. the method according to claim 1, wherein it is described by the image to be transmitted according to setting compress mode It is compressed, generating target thumbnail information includes:
The image information of the image to be transmitted is obtained, described image information includes picture size;
Rule is determined according to setting compression multiplying power, and the compression multiplying power of the image to be transmitted is determined based on described image information;
Target painting canvas is drawn according to the compression multiplying power, generates target thumbnail information.
3. according to the method described in claim 2, it is characterized in that, described determine rule according to setting compression multiplying power, based on institute It states image information and determines that the compression multiplying power of the image to be transmitted includes:
Obtain the default mapping table of pre-generated picture size set and compression of images multiplying power;
Based on the picture size of the image to be transmitted, the corresponding affiliated target image size collection of the image to be transmitted is determined It closes;
It is based on the default mapping table according to the target image size set, determines the corresponding pressure of the image to be transmitted Demagnification rate.
4. according to the method described in claim 3, it is characterized by further comprising:
Obtain preset image sizes referring to set A1, preset image sizes referring to set A2, preset image sizes reference set A3, Preset image sizes referring to set A4, preset image sizes referring to set A5, wherein the A1 including gather (w, h) | int w < =100dp or int h≤100dp }, the A2 includes set { (w, h) | int w≤200dp or int h≤200dp };Institute Stating A3 includes set { (w, h) | int w≤400dp or int h≤400dp };The A4 include set (w, h) | int w < =800dp or int h≤800dp };The A5 includes set { (w, h) | int w≤1600dp or int h≤1600dp }, The w is the width of image, and the h is the height of image;
Picture size set B1, picture size set B2, picture size set B3, picture size set B4 are calculated, wherein B1 is The difference of the A2 and the A1, B2 are the difference of the A3 and the A2, and B3 is the difference of the A4 and the A3, and B4 is institute State the difference of A5 and the A4;
Determine picture size set B1, picture size set B2, picture size set B3, the corresponding compression of picture size set B4 Multiplying power is respectively 1 times, 2 times, 4 times and 8 times;
Generate picture size set B1, picture size set B2, picture size set B3, picture size set B4 and respectively compression The default mapping table of multiplying power.
5. according to the method described in claim 4, it is characterized in that, being based on according to the target image size set described default Mapping table determines that the corresponding compression multiplying power of the image to be transmitted includes:
If the target image size collection is combined into B1, determine that the image to be transmitted is corresponding based on the default mapping table Compression multiplying power be 1 times;
If the target image size collection is combined into B2, determine that the image to be transmitted is corresponding based on the default mapping table Compression multiplying power be 2 times;
If the target image size collection is combined into B3, determine that the image to be transmitted is corresponding based on the default mapping table Compression multiplying power be 4 times;
If the target image size collection is combined into B4, determine that the image to be transmitted is corresponding based on the default mapping table Compression multiplying power be 8 times.
6. according to the method described in claim 2, it is characterized in that, described draw target painting canvas, life according to the compression multiplying power Include: at target thumbnail information
Create initial painting canvas;
According to the compression multiplying power, target width and object height are determined, and it is described that the initial painting canvas, which is adjusted to width, Target width and height are the target painting canvas of the object height;
The image reduced overall to be transmitted is plotted to the target painting canvas, generates target thumbnail information.
7. method according to claim 1-6, which is characterized in that described to transmit the target thumbnail information Include: to computer equipment
Based on media transmission protocol MTP, the target thumbnail information is passed by getThumbmail function with object approach Transport to computer equipment.
8. a kind of image transmitting control device characterized by comprising
Thumbnail information judgment module is used to determine whether that there are the thumbnail informations of image to be transmitted, wherein the thumbnail Information is the self-contained attribute information of image to be transmitted;
Thumbnail information generation module, for the thumbnail information if it does not exist, then by the image to be transmitted according to setting Compress mode is compressed, and target thumbnail information is generated;
Thumbnail information transmission module, for the target thumbnail information to be transmitted to computer equipment, the target breviary Figure information is used to indicate the computer equipment and shows the image to be transmitted with breviary diagram form;
Image type obtains module, for obtaining the image type of image to be transmitted;
The thumbnail information judgment module is specifically used for:
If described image type is the first setting type, judge whether the image to be transmitted includes thumbnail information;If no Include, it is determined that there is no the thumbnail informations of image to be transmitted;If comprising judging whether included thumbnail information closes Method;If legal, it is determined that there are the thumbnail informations of image to be transmitted;If it is illegal, it is determined that there is no images to be transmitted Thumbnail information;
If described image type is the second setting type, it is determined that there is no the thumbnail informations of the image to be transmitted;
Wherein, it is described first setting type include Joint Photographic Experts Group JPEG type, digitlization news collection DNG type and Label image file format TIFF type, the second setting type includes portable network graphic PNG type, bitmap BMP class Type, graphic interchange format GIF type, scalable vector graphics SVG type or Raw Image Format RAW type.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The image transmission control method as described in any in claim 1-7 is realized when row.
10. a kind of mobile terminal including memory, processor and stores the calculating that can be run on a memory and on a processor Machine program, which is characterized in that the processor is realized as described in any in claim 1-7 when executing the computer program Image transmission control method.
CN201711240069.1A 2017-11-30 2017-11-30 Image transmission control method, device and storage medium and mobile terminal Active CN107911571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711240069.1A CN107911571B (en) 2017-11-30 2017-11-30 Image transmission control method, device and storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711240069.1A CN107911571B (en) 2017-11-30 2017-11-30 Image transmission control method, device and storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN107911571A CN107911571A (en) 2018-04-13
CN107911571B true CN107911571B (en) 2019-06-28

Family

ID=61849374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711240069.1A Active CN107911571B (en) 2017-11-30 2017-11-30 Image transmission control method, device and storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN107911571B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8705076B2 (en) * 2004-04-02 2014-04-22 Samsung Electronics Co., Ltd Printing system and method thereof
KR100810303B1 (en) * 2005-04-28 2008-03-06 삼성전자주식회사 Method for displaying and transmitting data in wireless terminal
CN104346386B (en) * 2013-07-31 2018-01-02 株式会社理光 Cloud server and image display system
CN103699673B (en) * 2013-12-30 2017-07-25 广州猎豹网络科技有限公司 A kind of image processing method of mobile terminal, device and mobile terminal
CN105447034A (en) * 2014-08-29 2016-03-30 富泰华工业(深圳)有限公司 Method and system for generating picture thumbnail
CN104933184A (en) * 2015-06-30 2015-09-23 上海玮舟微电子科技有限公司 Picture output method and device
CN106528617B (en) * 2016-09-30 2019-08-16 北京小米移动软件有限公司 A kind of method and device that Web page picture is shown

Also Published As

Publication number Publication date
CN107911571A (en) 2018-04-13

Similar Documents

Publication Publication Date Title
CN109670427B (en) Image information processing method and device and storage medium
CN110059685B (en) Character area detection method, device and storage medium
CN106453572B (en) Method and system based on Cloud Server synchronous images
CN107948724A (en) Method for controlling video transmission, device and storage medium and mobile terminal
CN107491560A (en) Page pictures display methods, device, storage medium, server and mobile terminal
CN110933334B (en) Video noise reduction method, device, terminal and storage medium
CN112770059B (en) Photographing method and device and electronic equipment
CN109168032B (en) Video data processing method, terminal, server and storage medium
CN110769050B (en) Data processing method, data processing system, computer device, and storage medium
CN110795007A (en) Method and device for acquiring screenshot information
CN110750734A (en) Weather display method and device, computer equipment and computer-readable storage medium
CN111770340A (en) Video encoding method, device, equipment and storage medium
CN108763350A (en) Text data processing method, device, storage medium and terminal
CN116095413A (en) Video processing method and electronic equipment
CN107911571B (en) Image transmission control method, device and storage medium and mobile terminal
US20220264176A1 (en) Digital space management method, apparatus, and device
CN114780181A (en) Resource display method, device, computer equipment and medium
CN112711636B (en) Data synchronization method, device, equipment and medium
CN111698512B (en) Video processing method, device, equipment and storage medium
CN111866047B (en) Data decoding method, device, computer equipment and storage medium
CN107479837A (en) The method and apparatus of virtual machine dilatation in cloud data system
CN114257755A (en) Image processing method, device, equipment and storage medium
CN113705309A (en) Scene type judgment method and device, electronic equipment and storage medium
CN116095412B (en) Video processing method and electronic equipment
CN117119119B (en) Compression transmission method, device and system for image data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant